aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient/languageclientmanager.h
Commit message (Collapse)AuthorAgeFilesLines
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-1/+1
| | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LSP: Do not accumulate connections during signal emissionhjk2020-05-251-0/+1
| | | | | | | | | | | Amends cdeac76df3. During the execution of updateProject() triggered by a fileListChanged() emission new connections to the fileListChanged() were added, effectively making the emit never return and gobbling up all available memory. Change-Id: I18a1ab9b32c2e797e990449385a5353782211560 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LSP: add symbol support classDavid Schulz2020-05-191-3/+0
| | | | | | | | | | | | Declutter the client and client manager by moving find usage and follow symbol into this helper. This functionality was "temporary" put into the client manager, but is more an implementation detail that shouldn't be handled in that central place. Rename symbol will also go into this helper class. Task-number: QTCREATORBUG-21578 Change-Id: I56680f6ccbb8d244066561167178af7b341b8822 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LSP: Robustify open documentsDavid Schulz2020-05-141-2/+7
| | | | | | | | | | | Use Client::openDocument if you just want to open a document and activate it if it is not already used in another client. Use LanguageClientManager::openDocumentWithClient if you want to make sure a document is opened _and_ activated for a specific client. Change-Id: I6b790f15e17335ce2dc8981a04d2cd571b22b66b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LSP: react on file list changed signal from projectDavid Schulz2020-05-131-1/+1
| | | | | | | | | | | | | | | | | Fixes opening projects that lazy load their file lists. For example CMake projects open without a file list. This list will be generated after a successful configuration of the project. When a session is loaded that contains an open document from a project the document and project open signal is triggered when there is still no connection between these two. So recheck the project for documents after the file list got updated. Also add documents that are already opened before they are assigned to a project. Change-Id: I6f2bde0edf88a505116b05efe5564318f2cfb892 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: Add logging windowDavid Schulz2020-03-021-0/+7
| | | | | Change-Id: Ib86b70381b69df55d62a97abdf52b747f7f1c75e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LSP: take account of resolveTarget when checking for linksDavid Schulz2019-11-281-1/+1
| | | | | | | | | Return a link to the word under cursor when the target should not get resolved. This results in a highlight of the text the mouse cursor is positioned on when pressing ctrl to follow a link. Change-Id: Iaf1ba289644ed3e3fc062b418dd2fa3bfa8da6ad Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Add info bar entry to enable pylsDavid Schulz2019-10-181-0/+1
| | | | | | | | Show an editor info bar entry displaying that the language server for the current python is disabled and a button to quickly enable the pyls. Change-Id: I3adb2e7cbfb1a32e35413b0b06dfbe66a0b214af Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: allow adding settings via the managerDavid Schulz2019-09-231-0/+1
| | | | | | | | This adds the possibility to configure language servers from other plugins. Change-Id: I33c7d637ddd73dcfc0d02c366b8b9749ac1c2b98 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: export manager, client and settingsDavid Schulz2019-09-191-1/+2
| | | | | Change-Id: I8827fb1c36a41ab76b9509cdbf008e9f2309fd6c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: have one active client per open documentDavid Schulz2019-09-191-5/+6
| | | | | | | | | open a document in all clients supporting the document, but have just one client that provide functionality like highlights, completions, and find usages. Change-Id: I6bd72eb022005ed643fefd1da139d482f4dd5279 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: only send contents of TextDocuments to the serverDavid Schulz2019-09-121-5/+5
| | | | | Change-Id: Ifdcd6ba161336814744c51f15e35a756960cb199 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: open a document in just one clientDavid Schulz2019-09-091-3/+7
| | | | | | | | | | Also show a menu when triggering the language client toolbar button that allows you to manage and switch between different language clients. The default language server used to open a specific file type is determined by the order of the servers inside the settings. Change-Id: Ib1b21dd2c04d4559f538705e6ba229af043e02ae Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-2/+2
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* LanguageClient: add locator filters for symbols in workspace/projectDavid Schulz2019-05-141-0/+3
| | | | | | | | | | | | Implement locator filter that is using the workspace/symbol request to search for symbols in a project. In total three filters were added: ':': searches for all kind of symbols 'c': searches for classes and structs 'm': searches for methods and functions Fixes: QTCREATORBUG-21915 Change-Id: Id62c9e0b1bcb29112e35b926b1a5cf04357751c4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: Fix crash after disabling client settingDavid Schulz2019-05-091-2/+3
| | | | | Change-Id: I0f9ec02edc645726764fc9ea9ea1832e40bbef80 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: add current document locator filterDavid Schulz2019-04-301-0/+3
| | | | | Change-Id: I20442a254e4e016088b2da845d87af6e9f836731 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: add option to start client per projectDavid Schulz2019-04-291-3/+4
| | | | | | | | | Some server like rust or haskell require a project at server startup. Add option that postpones the server start until we can assign a project to an open file. Change-Id: Iaa475289e833b27a730a90ea228f5d85ecc30338 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: move setting client relationship to managerDavid Schulz2019-04-241-0/+3
| | | | | Change-Id: I9bf712227d44eada28abb18bbf641a2bfa835914 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: move current settings to managerDavid Schulz2019-04-231-0/+4
| | | | | | | | In preparation to have relationship between clients, settings and project to one another in the manager. Change-Id: I00ae15abe03c54b4a58e429d67d6ff939662cce6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: remove friend relationship between manager and pluginDavid Schulz2019-04-041-3/+1
| | | | | Change-Id: I594d62615f365db34174c4bd1e6c8a9f6aeb545a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: connect each editor widget to the LanguageClientManagerDavid Schulz2019-03-121-0/+1
| | | | | | | ... not just the first returned by BaseTextEditor::textEditorForDocument Change-Id: I262cd68e6dea59aa23be718fb85d2ae68c40ef39 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LanguageClient: Use document instead of editor opened/closedDavid Schulz2019-03-121-2/+2
| | | | | | | | Makes sure that the same document is not twice reported as opened to the language server. Change-Id: I348b0f4d8f9162e6ba73a4e3292abce146935eca Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LSP: move text marks from the manager to the individual clientsDavid Schulz2019-02-041-9/+0
| | | | | | | | | | | | 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>
* LSP: rename BaseClient -> ClientDavid Schulz2019-02-041-12/+12
| | | | | | | | 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>
* LSP: add Command and CodeAction support to the language clientDavid Schulz2019-01-311-1/+1
| | | | | Change-Id: I9e86c17b87c6b6aef36bd0ca293d9db40c554aad Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LSP: Collect usages of the symbol under cursorDavid Schulz2019-01-171-0/+1
| | | | | | Fixes: QTCREATORBUG-21577 Change-Id: I2bc6a0ac094eb74f802f5fe77a6eab2c82cbbbbf Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LSP: add outline supportDavid Schulz2019-01-101-0/+2
| | | | | | Fixes: QTCREATORBUG-21573 Change-Id: If579715c84210eb80d258ec944e00f1fac1badbe Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* LanguageClient: ModernizeAlessandro Portale2018-11-141-3/+3
| | | | | | | modernize-* Change-Id: I966de09934b9ba3b0497d1df5744c8c3f826240f Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* LSP: let the settings generate the clientDavid Schulz2018-09-201-1/+0
| | | | | | | In preperation for settings other than the stdio client. Change-Id: I11635119db9165163947d822e911ee26ce8548f1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LSP: use asynchronous shutdown for running serversDavid Schulz2018-09-201-0/+8
| | | | | Change-Id: I3b1853177d07c98e051de0bc9f494389fbf4c104 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LSP: correctly shutdown client that is currently being restartedDavid Schulz2018-09-191-0/+2
| | | | | Change-Id: I9fb0ccd9aa181515efc9368b0b369dfc39dffcd1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* LSP: use QtcProcess::splitArgs for language server argumentsDavid Schulz2018-09-111-0/+2
| | | | | | | | 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>
* Introduce a basic client for the language server protocolDavid Schulz2018-09-031-0/+95
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>