InitializeParams should include an empty ClientCapabilities (#2466)

The protocol specifies that the InitializeParams object contains a
capabilities property. Eclipse Che does not define it, so there are
language servers that fails to initialize because of this.

Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
6.19.x
Kaloyan Raev 2016-09-19 14:57:31 +03:00 committed by Vitalii Parfonov
parent f03fbbccce
commit f77d7f9b42
1 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@ package org.eclipse.che.plugin.languageserver.server.registry;
import io.typefox.lsapi.InitializeResult;
import io.typefox.lsapi.ServerCapabilities;
import io.typefox.lsapi.impl.ClientCapabilitiesImpl;
import io.typefox.lsapi.impl.InitializeParamsImpl;
import io.typefox.lsapi.services.LanguageServer;
@ -151,6 +152,7 @@ public class ServerInitializerImpl implements ServerInitializer {
InitializeParamsImpl initializeParams = new InitializeParamsImpl();
initializeParams.setProcessId(PROCESS_ID);
initializeParams.setRootPath(projectPath);
initializeParams.setCapabilities(new ClientCapabilitiesImpl());
initializeParams.setClientName(CLIENT_NAME);
return initializeParams;
}