mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 06:17:18 +00:00
Fixes #1383
This commit is contained in:
parent
5bea050a68
commit
41af798248
|
@ -14,7 +14,8 @@
|
|||
},
|
||||
"activationEvents": [
|
||||
"onLanguage:typescript",
|
||||
"onLanguage:typescriptreact"
|
||||
"onLanguage:typescriptreact",
|
||||
"onCommand:typescript.reloadProjects"
|
||||
],
|
||||
"main": "./out/typescriptMain",
|
||||
"contributes": {
|
||||
|
@ -77,7 +78,8 @@
|
|||
"commands": [
|
||||
{
|
||||
"command": "typescript.reloadProjects",
|
||||
"title": "TypeScript: Reload Projects"
|
||||
"title": "Reload Projects",
|
||||
"category": "TypeScript"
|
||||
}
|
||||
],
|
||||
"debuggers": [
|
||||
|
|
|
@ -37,13 +37,14 @@ export function activate(context: ExtensionContext): void {
|
|||
|
||||
let clientHost = new TypeScriptServiceClientHost();
|
||||
let client = clientHost.serviceClient;
|
||||
|
||||
context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => {
|
||||
clientHost.reloadProjects();
|
||||
}));
|
||||
// Register the supports for both TS and TSX so that we can have separate grammars but share the mode
|
||||
client.onReady().then(() => {
|
||||
registerSupports(MODE_ID_TS, clientHost, client);
|
||||
registerSupports(MODE_ID_TSX, clientHost, client);
|
||||
context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => {
|
||||
clientHost.reloadProjects();
|
||||
}));
|
||||
}, () => {
|
||||
// Nothing to do here. The client did show a message;
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue