aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/languageclient/languageclientmanager.h
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-09-10 08:03:58 +0200
committerDavid Schulz <david.schulz@qt.io>2019-09-19 08:53:47 +0000
commit468f60490090ee6e01ff900fe381f02efa362e4f (patch)
treebe023a5de4a879486875c0f71f74bb308a10929c /src/plugins/languageclient/languageclientmanager.h
parent6200af0822af3e7360afefb11f804c94f857efaa (diff)
LanguageClient: have one active client per open document
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>
Diffstat (limited to 'src/plugins/languageclient/languageclientmanager.h')
-rw-r--r--src/plugins/languageclient/languageclientmanager.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/languageclient/languageclientmanager.h b/src/plugins/languageclient/languageclientmanager.h
index f12e2f9d48..8c03eaa26b 100644
--- a/src/plugins/languageclient/languageclientmanager.h
+++ b/src/plugins/languageclient/languageclientmanager.h
@@ -77,7 +77,9 @@ public:
static QVector<Client *> clientForSetting(const BaseSettings *setting);
static const BaseSettings *settingForClient(Client *setting);
static Client *clientForDocument(TextEditor::TextDocument *document);
- static bool reOpenDocumentWithClient(TextEditor::TextDocument *document, Client *client);
+ static Client *clientForFilePath(const Utils::FilePath &filePath);
+ static Client *clientForUri(const LanguageServerProtocol::DocumentUri &uri);
+ static void reOpenDocumentWithClient(TextEditor::TextDocument *document, Client *client);
signals:
void shutdownFinished();
@@ -87,13 +89,13 @@ private:
void editorOpened(Core::IEditor *editor);
void documentOpened(Core::IDocument *document);
- bool openDocumentWithClient(TextEditor::TextDocument *document, Client *client);
+ void openDocumentWithClient(TextEditor::TextDocument *document, Client *client);
void documentClosed(Core::IDocument *document);
void documentContentsSaved(Core::IDocument *document);
void documentWillSave(Core::IDocument *document);
- void findLinkAt(const Utils::FilePath &filePath, const QTextCursor &cursor,
+ void findLinkAt(TextEditor::TextDocument *document, const QTextCursor &cursor,
Utils::ProcessLinkCallback callback);
- void findUsages(const Utils::FilePath &filePath, const QTextCursor &cursor);
+ void findUsages(TextEditor::TextDocument *document, const QTextCursor &cursor);
void projectAdded(ProjectExplorer::Project *project);
void projectRemoved(ProjectExplorer::Project *project);
@@ -101,7 +103,6 @@ private:
QVector<Client *> reachableClients();
void sendToAllReachableServers(const LanguageServerProtocol::IContent &content);
- void clientInitialized(Client *client);
void clientFinished(Client *client);
bool m_shuttingDown = false;