Skip to content

Commit 3aa0933

Browse files
committed
Registered new extension command
1 parent ca8cce5 commit 3aa0933

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/extension.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
ProjectDirectoryStructure,
1212
ShowComponentHierarchy,
1313
} from '@commands';
14+
import { ShowModuleHierarchy } from './commands/showModuleHierarchy';
1415

1516
export function activate(context: vscode.ExtensionContext) {
1617

@@ -67,6 +68,22 @@ export function activate(context: vscode.ExtensionContext) {
6768
command.execute(componentHierarchyPanel.webview);
6869
});
6970
context.subscriptions.push(showComponentHierarchyDisposable);
71+
72+
const showModuleHierarchyDisposable = vscode.commands.registerCommand(`${cmdPrefix}.${ShowModuleHierarchy.commandName}`, () => {
73+
const moduleHierarchyPanel = vscode.window.createWebviewPanel(
74+
'angularTools_showModuleHierarchy',
75+
'Angular module hierarchy',
76+
vscode.ViewColumn.One,
77+
{
78+
enableScripts: true
79+
}
80+
);
81+
moduleHierarchyPanel.onDidDispose(() => {
82+
}, null, context.subscriptions);
83+
const command = new ShowModuleHierarchy(context);
84+
command.execute(moduleHierarchyPanel.webview);
85+
});
86+
context.subscriptions.push(showModuleHierarchyDisposable);
7087
}
7188

7289
// this method is called when your extension is deactivated

0 commit comments

Comments
 (0)