Automatically show language server logs in Eclipse console

This commit is contained in:
Kris De Volder
2018-02-01 13:49:06 -08:00
parent 176a40b4b3
commit 42fc5da462
9 changed files with 273 additions and 10 deletions

View File

@@ -30,6 +30,7 @@ import org.springframework.tooling.ls.eclipse.commons.STS4LanguageServerProcessS
public class SpringBootPropertiesLanguageServer extends STS4LanguageServerProcessStreamConnector {
public SpringBootPropertiesLanguageServer() {
super("Boot Properties Language Server");
List<String> commands = new ArrayList<>();
commands.add(JRE.currentJRE().getJavaExecutable());
@@ -53,14 +54,26 @@ public class SpringBootPropertiesLanguageServer extends STS4LanguageServerProces
Bundle bundle = Platform.getBundle(Constants.PLUGIN_ID);
File dataFile = bundle.getDataFile(languageServer);
// if (!dataFile.exists()) {
try {
copyLanguageServerJAR(languageServer);
Exception error = null;
try {
copyLanguageServerJAR(languageServer);
}
catch (Exception e) {
error = e;
}
if (!dataFile.exists()) {
File userHome = new File(System.getProperty("user.home"));
File locallyBuiltJar = new File(
userHome,
"git/sts4/headless-services/boot-properties-language-server/target/boot-properties-language-server-"+Constants.LANGUAGE_SERVER_VERSION + ".jar"
);
if (locallyBuiltJar.exists()) {
return locallyBuiltJar.getAbsolutePath();
}
catch (Exception e) {
e.printStackTrace();
if (error!=null) {
error.printStackTrace();
}
// }
}
return dataFile.getAbsolutePath();
}