Instead of checking recursively every possible object just check the
required keys for an object and validate it on construction or
assignment from json.
This will reduce the implementation effort for protocol extensions and
also reduce the false positives we might get if the protocol gets
updated.
Change-Id: I3df24e62430d2c7575d26c1581e6a9606e7da4c1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... to be able to add more features to this dialog.
Change-Id: If8692bee484e25c1ba5e4ea629a77d14ff5d92ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Ordering in container by pointer to memory doesn't make much sense.
QHash is faster for lookups in this case.
Change-Id: I0d4bdac7f5bb9afffdeaef70b99326547c080f55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The VersionedTextDocumentIdentifier can be acccessed under textDocument
not id.
Change-Id: I9b3531532ed92885147525fa580c62d4b52f9c4b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
When removing actions from a widget the action is not magically deleted,
so manually delete the language client toolbar action of the editor
after the last client was shutdown.
Change-Id: I6a5a079d4a44724f92d291040925df73f7eb747b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
Move it from language client utils to a static function inside
the text document.
Change-Id: I91bc72d0e978c1d843082e12bb8a0fa60a1bbc5e
Reviewed-by: Eike Ziller <eike.ziller@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>