forked from qt-creator/qt-creator
LanguageClient: move capabilities widget to inspector
The capabilities are not changeable for the user, but only there to check whether a server is capable of a specific task. This will also allow us to have more specialized settings widgets for specific servers like for the java language server without the need to add the capabilities to each of those special widgets. Also add the dynamic capabilities to the widget so users have a complete overview of the capabilities. Change-Id: I9f2ed6ed11b458f0d4c67be3df632fd810023286 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -597,11 +597,13 @@ void Client::registerCapabilities(const QList<Registration> ®istrations)
|
||||
for (auto document : m_openedDocument.keys())
|
||||
updateFunctionHintProvider(document);
|
||||
}
|
||||
emit capabilitiesChanged(m_dynamicCapabilities);
|
||||
}
|
||||
|
||||
void Client::unregisterCapabilities(const QList<Unregistration> &unregistrations)
|
||||
{
|
||||
m_dynamicCapabilities.unregisterCapability(unregistrations);
|
||||
emit capabilitiesChanged(m_dynamicCapabilities);
|
||||
}
|
||||
|
||||
TextEditor::HighlightingResult createHighlightingResult(const SymbolInformation &info)
|
||||
@@ -1079,7 +1081,7 @@ void Client::handleMethod(const QString &method, const MessageId &id, const ICon
|
||||
} else if (method == UnregisterCapabilityRequest::methodName) {
|
||||
auto params = dynamic_cast<const UnregisterCapabilityRequest *>(content)->params().value_or(UnregistrationParams());
|
||||
if (params.isValid(&error))
|
||||
m_dynamicCapabilities.unregisterCapability(params.unregistrations());
|
||||
unregisterCapabilities(params.unregistrations());
|
||||
else
|
||||
logError(params);
|
||||
} else if (method == ApplyWorkspaceEditRequest::methodName) {
|
||||
|
||||
Reference in New Issue
Block a user