use of org.eclipse.che.api.languageserver.exception.LanguageServerException in project che by eclipse.
the class PhpLanguageServerLauncher method startLanguageServerProcess.
protected Process startLanguageServerProcess(String projectPath) throws LanguageServerException {
ProcessBuilder processBuilder = new ProcessBuilder(launchScript.toString());
processBuilder.redirectInput(ProcessBuilder.Redirect.PIPE);
processBuilder.redirectOutput(ProcessBuilder.Redirect.PIPE);
try {
return processBuilder.start();
} catch (IOException e) {
throw new LanguageServerException("Can't start PHP language server", e);
}
}
use of org.eclipse.che.api.languageserver.exception.LanguageServerException in project che by eclipse.
the class CSharpLanguageServerLauncher method startLanguageServerProcess.
@Override
protected Process startLanguageServerProcess(String projectPath) throws LanguageServerException {
restoreDependencies(projectPath);
ProcessBuilder processBuilder = new ProcessBuilder(launchScript.toString());
processBuilder.redirectInput(ProcessBuilder.Redirect.PIPE);
processBuilder.redirectOutput(ProcessBuilder.Redirect.PIPE);
try {
return processBuilder.start();
} catch (IOException e) {
throw new LanguageServerException("Can't start CSharp language server", e);
}
}
use of org.eclipse.che.api.languageserver.exception.LanguageServerException in project che by eclipse.
the class TSLSLauncher method startLanguageServerProcess.
@Override
protected Process startLanguageServerProcess(String projectPath) throws LanguageServerException {
ProcessBuilder processBuilder = new ProcessBuilder(launchScript.toString());
processBuilder.redirectInput(ProcessBuilder.Redirect.PIPE);
processBuilder.redirectOutput(ProcessBuilder.Redirect.PIPE);
try {
return processBuilder.start();
} catch (IOException e) {
throw new LanguageServerException("Can't start TypeScript language server", e);
}
}
use of org.eclipse.che.api.languageserver.exception.LanguageServerException in project che by eclipse.
the class CSharpLanguageServerLauncher method restoreDependencies.
private void restoreDependencies(String projectPath) throws LanguageServerException {
ProcessBuilder processBuilder = new ProcessBuilder("dotnet", "restore");
processBuilder.directory(new File(projectPath));
try {
Process process = processBuilder.start();
int resultCode = process.waitFor();
if (resultCode != 0) {
String err = IoUtil.readStream(process.getErrorStream());
String in = IoUtil.readStream(process.getInputStream());
throw new LanguageServerException("Can't restore dependencies. Error: " + err + ". Output: " + in);
}
} catch (IOException | InterruptedException e) {
throw new LanguageServerException("Can't start CSharp language server", e);
}
}
use of org.eclipse.che.api.languageserver.exception.LanguageServerException in project che by eclipse.
the class JsonLanguageServerLauncher method startLanguageServerProcess.
protected Process startLanguageServerProcess(String projectPath) throws LanguageServerException {
ProcessBuilder processBuilder = new ProcessBuilder(launchScript.toString());
processBuilder.redirectInput(ProcessBuilder.Redirect.PIPE);
processBuilder.redirectOutput(ProcessBuilder.Redirect.PIPE);
try {
return processBuilder.start();
} catch (IOException e) {
throw new LanguageServerException("Can't start JSON language server", e);
}
}
Aggregations