use of org.eclipse.n4js.xtext.ide.server.XLanguageServerImpl in project n4js by eclipse.
the class LspServer method setupAndRun.
private void setupAndRun(ExecutorService threadPool, XLanguageServerImpl languageServer) throws N4jscException, InterruptedException, ExecutionException, IOException {
DebugService debugService = languageServer.getDebugService();
Builder<LanguageClient> lsBuilder = new PatchedLauncherBuilder<LanguageClient>().setLocalService(languageServer).setRemoteInterface(LanguageClient.class).setExecutorService(threadPool).configureGson(gsonBuilder -> {
gsonBuilder.registerTypeAdapterFactory(new ExecuteCommandParamsTypeAdapter.Factory(languageServer));
}).wrapMessages(debugService.getTracingMessageWrapper());
if (options.isStdio()) {
setupAndRunWithSystemIO(languageServer, lsBuilder);
} else {
setupAndRunWithSocket(languageServer, lsBuilder);
}
}
use of org.eclipse.n4js.xtext.ide.server.XLanguageServerImpl in project n4js by eclipse.
the class LspServer method performLifecycle.
private void performLifecycle(ExecutorService threadPool) throws N4jscException, InterruptedException, ExecutionException, IOException {
setPersistionOptions();
XLanguageServerImpl languageServer = N4jscFactory.getLanguageServer();
setupAndRun(threadPool, languageServer);
N4jscFactory.resetInjector();
}
Aggregations