use of org.eclipse.che.api.languageserver.shared.model.impl.InitializeResultImpl in project che by eclipse.
the class LanguageServerRegistry method register.
/**
* Registers language server description and capabilities.
*/
protected void register(String projectPath, LanguageDescription languageDescription, ServerCapabilities capabilities) {
InitializeResult initializeResult = new InitializeResultImpl(capabilities, languageDescription);
for (String ext : languageDescription.getFileExtensions()) {
ProjectExtensionKey key = createProjectKey(projectPath, ext);
projectToInitResult.put(key, initializeResult);
if (callbackMap.containsKey(key)) {
Callback<InitializeResult, Throwable> callback = callbackMap.remove(key);
callback.onSuccess(initializeResult);
}
}
}
Aggregations