Experimental concourse pipeline generator
This commit is contained in:
@@ -57,7 +57,6 @@ public class STS4LanguageClientImpl extends LanguageClientImpl implements STS4La
|
||||
);
|
||||
|
||||
public STS4LanguageClientImpl() {
|
||||
System.out.println("Instantiatin STS4LanguageClientImpl");
|
||||
}
|
||||
|
||||
private static final String ANNOTION_TYPE_ID = "org.springframework.tooling.bootinfo";
|
||||
|
||||
@@ -10,12 +10,34 @@ import { workspace, TextDocument } from 'vscode';
|
||||
|
||||
import * as commons from '@pivotal-tools/commons-vscode';
|
||||
|
||||
import {generate_pipeline, UserQuestioner} from '@pivotal-tools/pipeline-builder';
|
||||
|
||||
const PROPERTIES_LANGUAGE_ID = "spring-boot-properties";
|
||||
const YAML_LANGUAGE_ID = "spring-boot-properties-yaml";
|
||||
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<string>((resolve, reject) => {
|
||||
VSCode.window.showInputBox({
|
||||
prompt: `Enter '${property}': `,
|
||||
value: defaultValue,
|
||||
valueSelection: [0, defaultValue.length]
|
||||
}).then(resolve, reject);
|
||||
})
|
||||
);
|
||||
}
|
||||
}));
|
||||
|
||||
let options : commons.ActivatorOptions = {
|
||||
DEBUG: false,
|
||||
CONNECT_TO_LS: false,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"vscode": "^1.19.0"
|
||||
},
|
||||
"categories": [
|
||||
"Languages",
|
||||
"Programming Languages",
|
||||
"Linters"
|
||||
],
|
||||
"keywords": [
|
||||
@@ -31,6 +31,12 @@
|
||||
"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"
|
||||
@@ -111,6 +117,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@pivotal-tools/commons-vscode": "file:../commons-vscode/pivotal-tools-commons-vscode-0.2.2.tgz",
|
||||
"@pivotal-tools/pipeline-builder": "^0.0.5",
|
||||
"vscode-languageclient": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user