Search in sources :

Example 1 with InitializeResultImpl

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);
        }
    }
}
Also used : InitializeResult(io.typefox.lsapi.InitializeResult) ProjectExtensionKey(org.eclipse.che.api.languageserver.shared.ProjectExtensionKey) InitializeResultImpl(org.eclipse.che.api.languageserver.shared.model.impl.InitializeResultImpl)

Aggregations

InitializeResult (io.typefox.lsapi.InitializeResult)1 ProjectExtensionKey (org.eclipse.che.api.languageserver.shared.ProjectExtensionKey)1 InitializeResultImpl (org.eclipse.che.api.languageserver.shared.model.impl.InitializeResultImpl)1