... and not just the first one returned by
BaseTextEditor::textEditorForDocument
Change-Id: I39e9271b3a2b6c0f131a5ce77959a8d57e462397
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If a shutdown is in progress we need an immediately delete
of the client to avoid accessing an already deleted
TextMarkRegistry instance when deleteLater() is triggered
too late.
Change-Id: I274f40532cec0bfc026322a633441a1856cb848c
Reviewed-by: David Schulz <david.schulz@qt.io>
Diagnostics are “owned” by the server so it is the server’s
responsibility to clear them if necessary. So do not delete the
corresponding text mark after a file was closed, because the server does
not have to resend the diagnostics when the file is reopened. Only
delete text marks when they are replaced or when the client is deleted
or reset.
Change-Id: Ief821c7ec401f4c52ee30d99f8dec47dcd6f1c98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Since BaseClient isn't part of an inheritance hirarchie any more the
Base doesn't make sense now.
Change-Id: I69200b19a22e5a04079e5289a02234af4f56a1bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The client got indirectly deleted from the manager while still in the
parsing output function during the last restart attempt. Fixing it by
freeing the client via deleteLater.
Change-Id: I2539a8b96b5568dc2ae15a6bfe4f2ab02c280f67
Fixes: QTCREATORBUG-21635
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Instead of always defining the templates of the response type by hand
add a using construct in the Request where all the template types are
known.
Change-Id: I0dc00bd9aef9c37c9454e35aca200a30fcf2ebda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
A message is already printed after an unexpected finish with restart attempt.
Without this last message it looks like Qt Creator still tries to restart
the server.
Change-Id: I47dd3e768d061a7d039ee3f125368c6e166ebf81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Having a corrupt language server might end up in a double
delete when closing the client.
Change-Id: I23e02d666d6c070a9f4b33605782fe875c5cabe6
Reviewed-by: David Schulz <david.schulz@qt.io>
When closing Qt Creator a message is send to the server requesting to
shutdown. Waiting an undefined amount of time for the response could
result in a never closing Qt Creator.
Change-Id: If09a32d34c546ae4702669d65e4921873e5658ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This avoids running into a soft assert and is basically the
common pattern used when shutting down the client.
Change-Id: I9a2eea8d2ffe51f81d6bb78353606ef492628897
Reviewed-by: David Schulz <david.schulz@qt.io>
In preperation for settings other than the stdio client.
Change-Id: I11635119db9165163947d822e911ee26ce8548f1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
All showMessage notification are send to the GeneralMessages Pane and
the showMessageRequest will show a message box
Change-Id: Ida3f2a43669ec4c08694ed74e086a281d3d66f9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Also store the executable and arguments in the stdio client to get a
more accurate comparison of clients.
Change-Id: I84fdd4ea5f32b17198d3f08e7f5d494f7fbe67dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The language server protocol is used to transport language specific
information needed to efficiently edit source files. For example
completion, go to operations and symbol information. These information
are transferred via JSON-RPC. The complete definition can be found under
https://microsoft.github.io/language-server-protocol/specification.
This language server protocol support consists of two major parts, the
C++ representation of the language server protocol, and the client part
for the communication with an external language server.
The TypeScript definitions of the protocol interfaces are transferred to
C++ classes. Those classes have getter and setter for every interface
value. Optional values from the protocol are represented by
Utils::optional<ValueType>. The JSON objects that are used to transfer
the data between client and server are hidden by a specialized
JsonObject class derived from QJsonObject. Additionally this JsonObject
provides a validity check that is capable of creating a detailed error
message for malformed, or at least unexpected JSON representation of the
protocol.
The client is the interface between Qt Creator and language server
functionality, like completion, diagnostics, document and workspace
synchronization. The base client converts the data that is sent from/to
the server between the raw byte array and the corresponding C++ objects.
The transportat layer is defined in a specialized base client (this
initial change will only support stdio language server). The running
clients are handled inside the language client manager, which is also
used to connect global and exclusive Qt Creator functionality to the
clients.
Task-number: QTCREATORBUG-20284
Change-Id: I8e123e20c3f14ff7055c505319696d5096fe1704
Reviewed-by: Eike Ziller <eike.ziller@qt.io>