Skip to content

Commit 7f82af8

Browse files
committed
GH-1621: take preference into account when launching language server (vscode part)
1 parent 2608eaa commit 7f82af8

File tree

1 file changed

+9
-3
lines changed
  • vscode-extensions/vscode-spring-boot/lib

1 file changed

+9
-3
lines changed

vscode-extensions/vscode-spring-boot/lib/Main.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,21 @@ const STOP_ASKING = "Stop Asking";
4343
export function activate(context: ExtensionContext): Thenable<ExtensionAPI> {
4444

4545
// registerPipelineGenerator(context);
46+
47+
const specificVmArgs = ["-Dspring.config.location=classpath:/application.properties"];
48+
49+
const workspaceConfig = workspace.getConfiguration("boot-java.ai");
50+
if (workspaceConfig.get("mcp-server-enabled") === false) {
51+
specificVmArgs.push("-Dspring.main.web-application-type=NONE");
52+
}
53+
4654
let options : commons.ActivatorOptions = {
4755
DEBUG: false,
4856
CONNECT_TO_LS: false,
4957
extensionId: 'vscode-spring-boot',
5058
preferJdk: true,
5159
jvmHeap: '1024m',
52-
vmArgs: [
53-
"-Dspring.config.location=classpath:/application.properties"
54-
],
60+
vmArgs: specificVmArgs,
5561
checkjvm: (context: ExtensionContext, jvm: commons.JVM) => {
5662
let version = jvm.getMajorVersion();
5763
if (version < 21) {

0 commit comments

Comments
 (0)