do not fail to load cloud foundry manifest language server in dev mode if the local file is not there

This commit is contained in:
Martin Lippert
2019-04-16 19:24:22 +02:00
parent c1af1a2d77
commit b564ef900e
2 changed files with 16 additions and 18 deletions

View File

@@ -84,6 +84,7 @@ public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamCon
String languageServerLocalCopy = bundleVersion + "-" + languageServer;
File dataFile = bundle.getDataFile(languageServerLocalCopy);
Exception error = null;
if (!dataFile.exists() || bundleVersion.endsWith("qualifier")) { // qualifier check to get the language server always copied in dev mode
try {
@@ -93,11 +94,12 @@ public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamCon
error = e;
}
}
if (bundleVersion.endsWith("qualifier")) {
File userHome = new File(System.getProperty("user.home"));
File locallyBuiltJar = new File(
userHome,
"git/sts4/headless-services/spring-boot-language-server/target/spring-boot-language-server-"+Constants.LANGUAGE_SERVER_VERSION
"git/sts4/headless-services/spring-boot-language-server/target/spring-boot-language-server-" + Constants.LANGUAGE_SERVER_VERSION
);
if (locallyBuiltJar.exists()) {
return locallyBuiltJar.getAbsolutePath();