Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
simplify by using new 'when' patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Feb 7, 2018
1 parent 5c16bf8 commit 11efc1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
19 changes: 2 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,9 @@
"views": {
"debug": [
{
"id": "extension.node-debug.loadedScriptsExplorer.node",
"id": "extension.node-debug.loadedScriptsExplorer",
"name": "%loaded.scripts.view.name%",
"when": "inDebugMode && debugType == 'node'"
},
{
"id": "extension.node-debug.loadedScriptsExplorer.node2",
"name": "%loaded.scripts.view.name%",
"when": "inDebugMode && debugType == 'node2'"
},
{
"id": "extension.node-debug.loadedScriptsExplorer.extensionHost",
"name": "%loaded.scripts.view.name%",
"when": "inDebugMode && debugType == 'extensionHost'"
},
{
"id": "extension.node-debug.loadedScriptsExplorer.chrome",
"name": "%loaded.scripts.view.name%",
"when": "inDebugMode && debugType == 'chrome'"
"when": "inDebugMode && debugType =~ /^(node|node2|extensionHost|chrome)$/"
}
]
},
Expand Down
6 changes: 1 addition & 5 deletions src/node/extension/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.commands.registerCommand('extension.pickNodeProcess', () => pickProcess()));

// loaded scripts
const provider = new LoadedScriptsProvider(context);
vscode.window.registerTreeDataProvider('extension.node-debug.loadedScriptsExplorer.node', provider);
vscode.window.registerTreeDataProvider('extension.node-debug.loadedScriptsExplorer.node2', provider);
vscode.window.registerTreeDataProvider('extension.node-debug.loadedScriptsExplorer.extensionHost', provider);
vscode.window.registerTreeDataProvider('extension.node-debug.loadedScriptsExplorer.chrome', provider);
vscode.window.registerTreeDataProvider('extension.node-debug.loadedScriptsExplorer', new LoadedScriptsProvider(context));
context.subscriptions.push(vscode.commands.registerCommand('extension.node-debug.pickLoadedScript', () => pickLoadedScript()));
context.subscriptions.push(vscode.commands.registerCommand('extension.node-debug.openScript', (session: vscode.DebugSession, source) => openScript(session, source)));

Expand Down

0 comments on commit 11efc1d

Please sign in to comment.