Fix compilation errors in Eclipse language servers
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user