Added command for selecting ts version (#19641)

* Added command for selecting the ts version

* Update name

* Update name
This commit is contained in:
Matt Bierner
2017-01-31 14:27:24 -08:00
committed by GitHub
parent d133a5e17c
commit 1ee3f9dc6c
4 changed files with 10 additions and 4 deletions

View File

@@ -31,7 +31,8 @@
"onLanguage:typescriptreact",
"onLanguage:jsx-tags",
"onCommand:typescript.reloadProjects",
"onCommand:javascript.reloadProjects"
"onCommand:javascript.reloadProjects",
"onCommand:typescript.selectTypeScriptVersion"
],
"main": "./out/typescriptMain",
"enableProposedApi": true,
@@ -260,6 +261,10 @@
{
"command": "javascript.reloadProjects",
"title": "%javascript.reloadProjects.title%"
},
{
"command": "typescript.selectTypeScriptVersion",
"title": "%typescript.selectTypeScriptVersion.title%"
}
],
"breakpoints": [

View File

@@ -24,5 +24,6 @@
"format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not.",
"format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not.",
"javascript.validate.enable": "Enable/disable JavaScript validation.",
"typescript.referencesCodeLens.enabled": "Enable/disable the references code lens"
"typescript.referencesCodeLens.enabled": "Enable/disable the references code lens",
"typescript.selectTypeScriptVersion.title": "Select TypeScript version"
}

View File

@@ -84,7 +84,7 @@ export function activate(context: ExtensionContext): void {
clientHost.reloadProjects();
}));
context.subscriptions.push(commands.registerCommand('_typescript.onVersionStatusClicked', () => {
context.subscriptions.push(commands.registerCommand('typescript.selectTypeScriptVersion', () => {
client.onVersionStatusClicked();
}));

View File

@@ -37,5 +37,5 @@ export function setInfo(message: string, tooltip: string) {
versionBarEntry.text = message;
versionBarEntry.tooltip = tooltip;
versionBarEntry.color = 'white';
versionBarEntry.command = '_typescript.onVersionStatusClicked';
versionBarEntry.command = 'typescript.selectTypeScriptVersion';
}