New LS JAR layout for vscode and eclipse extensions
This commit is contained in:
@@ -22,11 +22,12 @@
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>unpack-server</id>
|
||||
<id>copy-server</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
@@ -40,9 +41,29 @@
|
||||
</artifactItems>
|
||||
<overWriteReleases>true</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<outputDirectory>${project.build.directory}/../servers/spring-boot-language-server</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/servers</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>problem-types.json</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.springframework.ide.vscode</groupId>
|
||||
<artifactId>spring-boot-language-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<outputDirectory>${project.basedir}/servers/spring-boot-language-server</outputDirectory>
|
||||
<includes>**/problem-types.json</includes>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>xml-extension</id>
|
||||
<phase>prepare-package</phase>
|
||||
@@ -67,7 +88,57 @@
|
||||
<stripVersion>true</stripVersion>
|
||||
<overWriteReleases>true</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<outputDirectory>${project.build.directory}/../jars</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/jars</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>extract</id>
|
||||
<phase>prepare-package</phase>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-Djarmode=tools</argument>
|
||||
<argument>-jar</argument>
|
||||
<argument>${project.basedir}/servers/spring-boot-language-server-${project.version}-exec.jar</argument>
|
||||
<argument>extract</argument>
|
||||
<argument>--force</argument>
|
||||
<argument>--destination</argument>
|
||||
<argument>${project.basedir}/servers/spring-boot-language-server</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete>
|
||||
<fileset
|
||||
dir="${project.basedir}/servers"
|
||||
includes="spring-boot-language-server-${project.version}-exec.jar" />
|
||||
</delete>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2017, 2021 Pivotal, Inc.
|
||||
* Copyright (c) 2017, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -28,10 +28,9 @@ public class SpringBootLanguageServer extends STS4LanguageServerProcessStreamCon
|
||||
public SpringBootLanguageServer() {
|
||||
super(SPRING_BOOT_SERVER);
|
||||
|
||||
initExplodedJarCommand(
|
||||
initExecutableJarCommand(
|
||||
Paths.get("servers", "spring-boot-language-server"),
|
||||
"org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp",
|
||||
"application.properties",
|
||||
"spring-boot-language-server",
|
||||
getJVMArgs()
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2020, 2022 Pivotal, Inc.
|
||||
* Copyright (c) 2020, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -27,7 +27,7 @@ public class LanguageServerProblemTypesMetadata {
|
||||
|
||||
public static List<ProblemCategoryData> load() throws IOException {
|
||||
File root = FileLocator.getBundleFile(BootLanguageServerPlugin.getDefault().getBundle());
|
||||
File metadataFile = root.toPath().resolve("servers/spring-boot-language-server/BOOT-INF/classes/problem-types.json").toFile();
|
||||
File metadataFile = root.toPath().resolve("servers/spring-boot-language-server/problem-types.json").toFile();
|
||||
return readCategoriesFromFile(metadataFile);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-server</id>
|
||||
<id>copy-server</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
@@ -41,7 +41,7 @@
|
||||
</artifactItems>
|
||||
<overWriteReleases>true</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<outputDirectory>${project.build.directory}/../servers/bosh-language-server</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/servers</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
@@ -68,6 +68,56 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>extract</id>
|
||||
<phase>prepare-package</phase>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-Djarmode=tools</argument>
|
||||
<argument>-jar</argument>
|
||||
<argument>${project.basedir}/servers/bosh-language-server-${project.version}-exec.jar</argument>
|
||||
<argument>extract</argument>
|
||||
<argument>--force</argument>
|
||||
<argument>--destination</argument>
|
||||
<argument>${project.basedir}/servers/bosh-language-server</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete>
|
||||
<fileset
|
||||
dir="${project.basedir}/servers"
|
||||
includes="bosh-language-server-${project.version}-exec.jar" />
|
||||
</delete>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2016, 2019 Pivotal, Inc.
|
||||
* Copyright (c) 2016, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -25,16 +25,15 @@ public class BoshLanguageServer extends STS4LanguageServerProcessStreamConnector
|
||||
public BoshLanguageServer() {
|
||||
super(BOSH_SERVER);
|
||||
|
||||
initExplodedJarCommand(
|
||||
initExecutableJarCommand(
|
||||
Paths.get("servers", "bosh-language-server"),
|
||||
"org.springframework.ide.vscode.bosh.BoshLanguageServerBootApp",
|
||||
"application.properties",
|
||||
"bosh-language-server",
|
||||
Arrays.asList(
|
||||
"-Dlsp.lazy.completions.disable=true",
|
||||
"-XX:TieredStopAtLevel=1"
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
setWorkingDirectory(getWorkingDirLocation());
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
<version>3.1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-server</id>
|
||||
<id>copy-server</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
@@ -41,7 +41,7 @@
|
||||
</artifactItems>
|
||||
<overWriteReleases>true</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<outputDirectory>${project.build.directory}/../servers/manifest-yaml-language-server</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/servers</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
@@ -68,6 +68,56 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>extract</id>
|
||||
<phase>prepare-package</phase>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-Djarmode=tools</argument>
|
||||
<argument>-jar</argument>
|
||||
<argument>${project.basedir}/servers/manifest-yaml-language-server-${project.version}-exec.jar</argument>
|
||||
<argument>extract</argument>
|
||||
<argument>--force</argument>
|
||||
<argument>--destination</argument>
|
||||
<argument>${project.basedir}/servers/manifest-yaml-language-server</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete>
|
||||
<fileset
|
||||
dir="${project.basedir}/servers"
|
||||
includes="manifest-yaml-language-server-${project.version}-exec.jar" />
|
||||
</delete>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2016, 2020 Pivotal, Inc.
|
||||
* Copyright (c) 2016, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -41,16 +41,15 @@ public class CloudFoundryManifestLanguageServer extends STS4LanguageServerProces
|
||||
public CloudFoundryManifestLanguageServer() {
|
||||
super(CLOUDFOUNDRY_SERVER);
|
||||
|
||||
initExplodedJarCommand(
|
||||
initExecutableJarCommand(
|
||||
Paths.get("servers", "manifest-yaml-language-server"),
|
||||
"org.springframework.ide.vscode.manifest.yaml.ManifestYamlLanguageServerBootApp",
|
||||
"application.properties",
|
||||
"manifest-yaml-language-server",
|
||||
Arrays.asList(
|
||||
"-Dlsp.lazy.completions.disable=true",
|
||||
"-XX:TieredStopAtLevel=1"
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
setWorkingDirectory(getWorkingDirLocation());
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-server</id>
|
||||
<id>copy-server</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
@@ -41,7 +41,7 @@
|
||||
</artifactItems>
|
||||
<overWriteReleases>true</overWriteReleases>
|
||||
<overWriteSnapshots>true</overWriteSnapshots>
|
||||
<outputDirectory>${project.build.directory}/../servers/concourse-language-server</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/servers</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
@@ -68,6 +68,56 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>extract</id>
|
||||
<phase>prepare-package</phase>
|
||||
<configuration>
|
||||
<executable>java</executable>
|
||||
<arguments>
|
||||
<argument>-Djarmode=tools</argument>
|
||||
<argument>-jar</argument>
|
||||
<argument>${project.basedir}/servers/concourse-language-server-${project.version}-exec.jar</argument>
|
||||
<argument>extract</argument>
|
||||
<argument>--force</argument>
|
||||
<argument>--destination</argument>
|
||||
<argument>${project.basedir}/servers/concourse-language-server</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<delete>
|
||||
<fileset
|
||||
dir="${project.basedir}/servers"
|
||||
includes="concourse-language-server-${project.version}-exec.jar" />
|
||||
</delete>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2016, 2019 Pivotal, Inc.
|
||||
* Copyright (c) 2016, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -24,11 +24,10 @@ public class ConcourseLanguageServer extends STS4LanguageServerProcessStreamConn
|
||||
|
||||
public ConcourseLanguageServer() {
|
||||
super(CONCOURSE_SERVER);
|
||||
|
||||
initExplodedJarCommand(
|
||||
|
||||
initExecutableJarCommand(
|
||||
Paths.get("servers", "concourse-language-server"),
|
||||
"org.springframework.ide.vscode.concourse.ConcourseLanguageServerBootApp",
|
||||
"application.properties",
|
||||
"concourse-language-server",
|
||||
Arrays.asList(
|
||||
"-Dlsp.lazy.completions.disable=true",
|
||||
"-XX:TieredStopAtLevel=1"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2017, 2023 Pivotal, Inc.
|
||||
* Copyright (c) 2017, 2024 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -14,9 +14,11 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
@@ -80,6 +82,72 @@ public abstract class STS4LanguageServerProcessStreamConnector extends ProcessSt
|
||||
return JRE.currentJRE();
|
||||
}
|
||||
|
||||
protected final void initExecutableJarCommand(Path lsDir, String jarPrefix, List<String> extraVmArgs) {
|
||||
try {
|
||||
Bundle bundle = Platform.getBundle(getPluginId());
|
||||
JRE runtime = getJRE();
|
||||
|
||||
Assert.isNotNull(lsDir);
|
||||
|
||||
File bundleFile = FileLocator.getBundleFileLocation(bundle).orElse(null);
|
||||
File bundleRoot = bundleFile.getAbsoluteFile();
|
||||
Path languageServerRoot = bundleRoot.toPath().resolve(lsDir);
|
||||
|
||||
List<Path> jarFiles = Files.list(languageServerRoot).filter(Files::isRegularFile).filter(f -> {
|
||||
String fileName = f.toFile().getName();
|
||||
return fileName.endsWith(".jar") && fileName.startsWith(jarPrefix);
|
||||
}).limit(2).collect(Collectors.toList());
|
||||
|
||||
if (jarFiles.size() > 1) {
|
||||
throw new IllegalStateException("More than one LS JAR files found: '%s' and '%s'".formatted(jarFiles.get(0), jarFiles.get(1)));
|
||||
} else if (jarFiles.isEmpty()) {
|
||||
throw new IllegalStateException("No LS JAR files found!");
|
||||
}
|
||||
|
||||
Path jarFile = jarFiles.get(0);
|
||||
|
||||
List<String> command = new ArrayList<>();
|
||||
|
||||
command.add(runtime.getJavaExecutable());
|
||||
command.add("-jar");
|
||||
|
||||
command.add(languageServerRoot.resolve(jarFile).toFile().toString());
|
||||
|
||||
fillCommand(command, extraVmArgs);
|
||||
|
||||
setCommands(command);
|
||||
|
||||
LanguageServerCommonsActivator.getInstance().getLog().info("Command list starting LS: " + connectorId + "\nSTART:\n" + String.join("\n", command) + "\nEND");
|
||||
} catch (Throwable t) {
|
||||
LanguageServerCommonsActivator.logError(t, "Failed to assemble executable LS JAR launch command");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void fillCommand(List<String> command, List<String> extraVmArgs) {
|
||||
command.add("-Dsts.lsp.client=eclipse");
|
||||
|
||||
command.addAll(extraVmArgs);
|
||||
|
||||
if (!hasVmArgStartingWith(command, LOG_RESOLVE_VM_ARG_PREFIX)) {
|
||||
command.add(LOG_RESOLVE_VM_ARG_PREFIX + "off");
|
||||
}
|
||||
|
||||
LsPreferencesUtil.getServerInfo(getPluginId()).ifPresent(info -> {
|
||||
IPreferenceStore preferenceStore = LanguageServerCommonsActivator.getInstance().getPreferenceStore();
|
||||
if (!preferenceStore.getBoolean(info.preferenceKeyConsoleLog)) {
|
||||
String pathStr = preferenceStore.getString(info.preferenceKeyFileLog);
|
||||
if (pathStr != null && !pathStr.isBlank()) {
|
||||
command.add("-Dsts.log.file=" + pathStr);
|
||||
}
|
||||
}
|
||||
command.add("-XX:ErrorFile=" + Platform.getStateLocation(Platform.getBundle(getPluginId())).append("fatal-error-" + info.label.replaceAll("\\s+", "-").toLowerCase() + "_" + System.currentTimeMillis()));
|
||||
});
|
||||
|
||||
command.add("-Dlanguageserver.hover-timeout=225");
|
||||
|
||||
}
|
||||
|
||||
protected final void initExplodedJarCommand(Path lsFolder, String mainClass, String configFileName, List<String> extraVmArgs) {
|
||||
try {
|
||||
Bundle bundle = Platform.getBundle(getPluginId());
|
||||
@@ -113,39 +181,20 @@ public abstract class STS4LanguageServerProcessStreamConnector extends ProcessSt
|
||||
|
||||
command.add(classpath.toString());
|
||||
|
||||
command.add("-Dsts.lsp.client=eclipse");
|
||||
|
||||
command.addAll(extraVmArgs);
|
||||
|
||||
if (!hasVmArgStartingWith(command, LOG_RESOLVE_VM_ARG_PREFIX)) {
|
||||
command.add(LOG_RESOLVE_VM_ARG_PREFIX + "off");
|
||||
}
|
||||
|
||||
if (configFileName != null) {
|
||||
command.add("-Dspring.config.location=file:" + languageServerRoot.resolve("BOOT-INF/classes").resolve(configFileName).toFile());
|
||||
}
|
||||
|
||||
LsPreferencesUtil.getServerInfo(getPluginId()).ifPresent(info -> {
|
||||
IPreferenceStore preferenceStore = LanguageServerCommonsActivator.getInstance().getPreferenceStore();
|
||||
if (!preferenceStore.getBoolean(info.preferenceKeyConsoleLog)) {
|
||||
String pathStr = preferenceStore.getString(info.preferenceKeyFileLog);
|
||||
if (pathStr != null && !pathStr.isBlank()) {
|
||||
command.add("-Dsts.log.file=" + pathStr);
|
||||
}
|
||||
}
|
||||
command.add("-XX:ErrorFile=" + Platform.getStateLocation(bundle).append("fatal-error-" + info.label.replaceAll("\\s+", "-").toLowerCase() + "_" + System.currentTimeMillis()));
|
||||
});
|
||||
fillCommand(command, extraVmArgs);
|
||||
|
||||
command.add(mainClass);
|
||||
|
||||
command.add("--languageserver.hover-timeout=225");
|
||||
|
||||
setCommands(command);
|
||||
|
||||
LanguageServerCommonsActivator.getInstance().getLog().info("Command list starting LS: " + connectorId + "\nSTART:\n" + String.join("\n", command) + "\nEND");
|
||||
}
|
||||
catch (Exception e) {
|
||||
LanguageServerCommonsActivator.logError(e, "Failed to assemble exploded LS JAR launch command");
|
||||
catch (Throwable t) {
|
||||
LanguageServerCommonsActivator.logError(t, "Failed to assemble exploded LS JAR launch command");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ function createServerOptionsForPortComm(options: ActivatorOptions, context: VSCo
|
||||
jvm.mainClassLaunch(explodedLsJarData.mainClass, classpath, args, processLaunchoptions);
|
||||
} else {
|
||||
// Start the child java process
|
||||
const launcher = findServerJar(Path.resolve(context.extensionPath, 'jars'));
|
||||
const launcher = findServerJar(Path.resolve(context.extensionPath, 'language-server'));
|
||||
jvm.jarLaunch(launcher, args, processLaunchoptions);
|
||||
}
|
||||
});
|
||||
@@ -281,7 +281,7 @@ function addCpAndLauncherToJvmArgs(args: string[], options: ActivatorOptions, co
|
||||
} else {
|
||||
// Start the child java process
|
||||
args.push('-jar');
|
||||
const launcher = findServerJar(Path.resolve(context.extensionPath, 'jars'));
|
||||
const launcher = findServerJar(Path.resolve(context.extensionPath, 'language-server'));
|
||||
args.push(launcher);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,6 @@ export function activate(context: VSCode.ExtensionContext) {
|
||||
extensionId: 'vscode-bosh',
|
||||
jvmHeap: "48m",
|
||||
workspaceOptions: VSCode.workspace.getConfiguration("bosh.ls"),
|
||||
explodedLsJarData: {
|
||||
lsLocation: 'language-server',
|
||||
mainClass: 'org.springframework.ide.vscode.bosh.BoshLanguageServerBootApp',
|
||||
configFileName: 'application.properties'
|
||||
},
|
||||
clientOptions: {
|
||||
documentSelector: [
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.8.0",
|
||||
"@types/vscode": "1.75.0",
|
||||
"typescript": "^4.8.0",
|
||||
"@vscode/vsce": "^2.22.0"
|
||||
"@vscode/vsce": "^2.22.0",
|
||||
"typescript": "^4.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ cd ../../headless-services/bosh-language-server
|
||||
rm -fr ${workdir}/language-server
|
||||
mkdir -p ${workdir}/language-server
|
||||
|
||||
# Explode LS JAR
|
||||
cd ${workdir}/language-server
|
||||
server_jar_file=$(find ${workdir}/../../headless-services/bosh-language-server/target -name '*-exec.jar');
|
||||
jar -xvf ${server_jar_file}
|
||||
# Extract LS JAR
|
||||
cd ${workdir}/../../headless-services/bosh-language-server/target
|
||||
server_jar_file=$(find . -name '*-exec.jar');
|
||||
java -Djarmode=tools -jar $server_jar_file extract --destination ${workdir}/language-server
|
||||
|
||||
|
||||
@@ -31,11 +31,6 @@ export function activate(context: VSCode.ExtensionContext) {
|
||||
extensionId: 'vscode-concourse',
|
||||
jvmHeap: "48m",
|
||||
workspaceOptions: VSCode.workspace.getConfiguration("concourse.ls"),
|
||||
explodedLsJarData: {
|
||||
lsLocation: 'language-server',
|
||||
mainClass: 'org.springframework.ide.vscode.concourse.ConcourseLanguageServerBootApp',
|
||||
configFileName: 'application.properties'
|
||||
},
|
||||
clientOptions: {
|
||||
documentSelector: [
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.8.0",
|
||||
"@types/vscode": "1.75.0",
|
||||
"typescript": "^4.8.0",
|
||||
"@vscode/vsce": "^2.22.0"
|
||||
"@vscode/vsce": "^2.22.0",
|
||||
"typescript": "^4.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ cd ../../headless-services/concourse-language-server
|
||||
rm -fr ${workdir}/language-server
|
||||
mkdir -p ${workdir}/language-server
|
||||
|
||||
# Explode LS JAR
|
||||
cd ${workdir}/language-server
|
||||
server_jar_file=$(find ${workdir}/../../headless-services/concourse-language-server/target -name '*-exec.jar');
|
||||
jar -xvf ${server_jar_file}
|
||||
# Extract LS JAR
|
||||
cd ${workdir}/../../headless-services/concourse-language-server/target
|
||||
server_jar_file=$(find . -name '*-exec.jar');
|
||||
java -Djarmode=tools -jar $server_jar_file extract --destination ${workdir}/language-server
|
||||
|
||||
@@ -28,11 +28,6 @@ export function activate(context: VSCode.ExtensionContext) {
|
||||
extensionId: 'vscode-manifest-yaml',
|
||||
workspaceOptions: VSCode.workspace.getConfiguration("cloudfoundry-manifest.ls"),
|
||||
jvmHeap: '64m',
|
||||
explodedLsJarData: {
|
||||
lsLocation: 'language-server',
|
||||
mainClass: 'org.springframework.ide.vscode.manifest.yaml.ManifestYamlLanguageServerBootApp',
|
||||
configFileName: 'application.properties'
|
||||
},
|
||||
clientOptions: {
|
||||
documentSelector: [
|
||||
{
|
||||
|
||||
@@ -15,9 +15,9 @@ cd ../../headless-services/manifest-yaml-language-server
|
||||
rm -fr ${workdir}/language-server
|
||||
mkdir -p ${workdir}/language-server
|
||||
|
||||
# Explode LS JAR
|
||||
cd ${workdir}/language-server
|
||||
server_jar_file=$(find ${workdir}/../../headless-services/manifest-yaml-language-server/target -name '*-exec.jar');
|
||||
jar -xvf ${server_jar_file}
|
||||
# Extract LS JAR
|
||||
cd ${workdir}/../../headless-services/manifest-yaml-language-server/target
|
||||
server_jar_file=$(find . -name '*-exec.jar');
|
||||
java -Djarmode=tools -jar $server_jar_file extract --destination ${workdir}/language-server
|
||||
|
||||
|
||||
|
||||
@@ -60,11 +60,6 @@ export function activate(context: ExtensionContext): Thenable<ExtensionAPI> {
|
||||
);
|
||||
}
|
||||
},
|
||||
explodedLsJarData: {
|
||||
lsLocation: 'language-server',
|
||||
mainClass: 'org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp',
|
||||
configFileName: 'application.properties'
|
||||
},
|
||||
workspaceOptions: workspace.getConfiguration("spring-boot.ls"),
|
||||
clientOptions: {
|
||||
markdown: {
|
||||
|
||||
@@ -19,10 +19,10 @@ mkdir -p ${workdir}/language-server
|
||||
cd ${workdir}/../../headless-services/spring-boot-language-server
|
||||
./build.sh
|
||||
|
||||
# Explode LS JAR
|
||||
cd ${workdir}/language-server
|
||||
server_jar_file=$(find ${workdir}/../../headless-services/spring-boot-language-server/target -name '*-exec.jar');
|
||||
jar -xvf ${server_jar_file}
|
||||
# Extract LS JAR
|
||||
cd ${workdir}/../../headless-services/spring-boot-language-server/target
|
||||
server_jar_file=$(find . -name '*-exec.jar');
|
||||
java -Djarmode=tools -jar $server_jar_file extract --destination ${workdir}/language-server
|
||||
|
||||
# JDT LS Extension
|
||||
cd ${workdir}/../../headless-services/jdt-ls-extension
|
||||
|
||||
Reference in New Issue
Block a user