diff --git a/vscode-extensions/vscode-spring-boot/lib/Main.ts b/vscode-extensions/vscode-spring-boot/lib/Main.ts index ce769dc77..54c3a0d1c 100644 --- a/vscode-extensions/vscode-spring-boot/lib/Main.ts +++ b/vscode-extensions/vscode-spring-boot/lib/Main.ts @@ -19,24 +19,7 @@ const JAVA_LANGUAGE_ID = "java"; /** Called when extension is activated */ export function activate(context: VSCode.ExtensionContext) { - context.subscriptions.push(VSCode.commands.registerCommand('springboot.generate-concourse-pipeline', () => { - let q = (property, defaultValue) => { - defaultValue = defaultValue || ''; - return ; - } - let projectRoot = VSCode.workspace.rootPath; - if (projectRoot) { - return generate_pipeline(projectRoot, (property, defaultValue) => - new Promise((resolve, reject) => { - VSCode.window.showInputBox({ - prompt: `Enter '${property}': `, - value: defaultValue, - valueSelection: [0, defaultValue.length] - }).then(resolve, reject); - }) - ); - } - })); + // registerPipelineGenerator(context); let options : commons.ActivatorOptions = { DEBUG: false, @@ -62,3 +45,31 @@ export function activate(context: VSCode.ExtensionContext) { return commons.activate(options, context); } + +// NOTE: Be sure to add this under "contributes" in package.json to enable the command: +// +// "commands": [ +// { +// "command": "springboot.generate-concourse-pipeline", +// "title": "Spring Boot: Generate Concourse Pipeline" +// } +// ], +function registerPipelineGenerator(context: VSCode.ExtensionContext) { + context.subscriptions.push(VSCode.commands.registerCommand('springboot.generate-concourse-pipeline', () => { + let q = (property, defaultValue) => { + defaultValue = defaultValue || ''; + return; + }; + let projectRoot = VSCode.workspace.rootPath; + if (projectRoot) { + return generate_pipeline(projectRoot, (property, defaultValue) => new Promise((resolve, reject) => { + VSCode.window.showInputBox({ + prompt: `Enter '${property}': `, + value: defaultValue, + valueSelection: [0, defaultValue.length] + }).then(resolve, reject); + })); + } + })); +} + diff --git a/vscode-extensions/vscode-spring-boot/package.json b/vscode-extensions/vscode-spring-boot/package.json index e3950bf6f..7004d3c9f 100644 --- a/vscode-extensions/vscode-spring-boot/package.json +++ b/vscode-extensions/vscode-spring-boot/package.json @@ -31,12 +31,6 @@ "onLanguage:java" ], "contributes": { - "commands": [ - { - "command": "springboot.generate-concourse-pipeline", - "title": "Spring Boot: Generate Concourse Pipeline" - } - ], "javaExtensions": [ "./jars/jdt-ls-commons.jar", "./jars/jdt-ls-extension.jar"