1- 2- // import * as vscode from 'vscode';
3- // import { RouteProvider, RouteItem } from './RouteProvider';
4- 5- // export function activate(context: vscode.ExtensionContext) {
6- 7- // const rootPath = vscode.workspace.workspaceFolders?.[0].uri.fsPath;
8- 9- // // ✅ Pass `context` to RouteProvider
10- // const routeProvider = new RouteProvider(rootPath, context);
11- 12- // // Register the Tree View provider
13- // vscode.window.registerTreeDataProvider('nextjsRoutes', routeProvider);
14- 15- // // Register commands
16- // context.subscriptions.push(
17- // vscode.commands.registerCommand('nextjsRoutes.filterRoutes', async () => {
18- // const input = await vscode.window.showInputBox({
19- // prompt: 'Filter routes (e.g., /dashboard or user)',
20- // placeHolder: 'Type part of the route path to filter',
21- // });
22- 23- // routeProvider.setFilter(input ?? '');
24- // }),
25- 26- // vscode.commands.registerCommand('nextjsRoutes.refresh', () => {
27- // routeProvider.refresh();
28- // }),
29- 30- 31- // vscode.commands.registerCommand('nextjsRoutes.simulateNavigation', (item: RouteItem) => {
32- // vscode.window.showInformationMessage(`Simulated navigation to: ${item.label}`);
33- // }),
34- 35- // vscode.commands.registerCommand('nextjsRoutes.show', () => {
36- // vscode.commands.executeCommand('workbench.view.explorer');
37- // vscode.commands.executeCommand('workbench.view.extension.nextjsRoutes');
38- // })
39- // );
40- // }
41- 42- // export function deactivate() {}
43- 44- // -------- extension.ts --------
451import * as vscode from 'vscode' ;
462import { RouteProvider , RouteItem } from './RouteProvider' ;
473
@@ -76,4 +32,4 @@ export function activate(context: vscode.ExtensionContext) {
7632 ) ;
7733}
7834
79- export function deactivate ( ) { }
35+ export function deactivate ( ) { }
0 commit comments