use of org.eclipse.che.api.languageserver.launcher.LanguageServerLauncher in project che by eclipse.
the class LanguageServerRegistryImpl method findServer.
@Nullable
protected LanguageServer findServer(String extension, String projectPath) throws LanguageServerException {
ProjectExtensionKey projectKey = createProjectKey(projectPath, extension);
for (LanguageServerLauncher launcher : extensionToLauncher.get(extension)) {
if (!projectToServer.containsKey(projectKey)) {
synchronized (launcher) {
if (!projectToServer.containsKey(projectKey)) {
LanguageServer server = initializer.initialize(launcher, projectPath);
projectToServer.put(projectKey, server);
}
}
}
return projectToServer.get(projectKey);
}
return null;
}
Aggregations