Fix compilation errors in Eclipse language servers

This commit is contained in:
Kris De Volder
2018-01-29 14:07:34 -08:00
parent c6d49c1dee
commit 87a9639241
5 changed files with 12 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.springframework.tooling.ls.eclipse.commons.JRE;
import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessStreamConnector;
/**
@@ -30,7 +31,7 @@ public class BoshLanguageServer extends STS4LanguageServerProcessStreamConnector
public BoshLanguageServer() {
List<String> commands = new ArrayList<>();
commands.add(getJDKLocation());
commands.add(JRE.currentJRE().getJavaExecutable());
// commands.add("-Xdebug");
// commands.add("-agentlib:jdwp=transport=dt_socket,address=8899,server=y,suspend=n");

View File

@@ -28,6 +28,7 @@ import org.eclipse.lsp4j.jsonrpc.messages.Message;
import org.eclipse.lsp4j.jsonrpc.messages.ResponseMessage;
import org.eclipse.lsp4j.services.LanguageServer;
import org.osgi.framework.Bundle;
import org.springframework.tooling.ls.eclipse.commons.JRE;
import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessStreamConnector;
/**
@@ -44,7 +45,7 @@ public class CloudFoundryManifestLanguageServer extends STS4LanguageServerProces
public CloudFoundryManifestLanguageServer() {
List<String> commands = new ArrayList<>();
commands.add(getJDKLocation());
commands.add(JRE.currentJRE().getJavaExecutable());
// commands.add("-Xdebug");
// commands.add("-agentlib:jdwp=transport=dt_socket,address=8899,server=y,suspend=n");

View File

@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.springframework.tooling.ls.eclipse.commons.JRE;
import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessStreamConnector;
/**
@@ -30,7 +31,7 @@ public class ConcourseLanguageServer extends STS4LanguageServerProcessStreamConn
public ConcourseLanguageServer() {
List<String> commands = new ArrayList<>();
commands.add(getJDKLocation());
commands.add(JRE.currentJRE().getJavaExecutable());
// commands.add("-Xdebug");
// commands.add("-agentlib:jdwp=transport=dt_socket,address=8899,server=y,suspend=n");

View File

@@ -45,6 +45,10 @@ public class JRE {
return "JRE("+javaHome+")";
}
public static JRE currentJRE() {
return new JRE(new File(System.getProperty("java.home")), null);
}
/**
* Get a JRE, with a paired tools jar if it is needed based on current JRE version
* and whether the caller wants it.
@@ -147,6 +151,4 @@ public class JRE {
}
public final File javaHome;
}
}

View File

@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.springframework.tooling.ls.eclipse.commons.JRE;
import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessStreamConnector;
/**
@@ -30,7 +31,7 @@ public class SpringBootPropertiesLanguageServer extends STS4LanguageServerProces
public SpringBootPropertiesLanguageServer() {
List<String> commands = new ArrayList<>();
commands.add(getJDKLocation());
commands.add(JRE.currentJRE().getJavaExecutable());
// commands.add("-Xdebug");
// commands.add("-agentlib:jdwp=transport=dt_socket,address=8899,server=y,suspend=n");