Files
devstar_plugin/src/main.ts

43 lines
976 B
TypeScript

import * as vscode from 'vscode';
import QuickAccessTreeProvider from './views/quick-access-tree';
import SIHome from './home';
export class SuperIDEExtension {
siHome: SIHome;
constructor(private context: vscode.ExtensionContext) {
this.siHome = new SIHome(context);
context.subscriptions.push(
vscode.window.registerTreeDataProvider(
'superide.quickAccess',
new QuickAccessTreeProvider()
)
);
this.registerGlobalCommands(context);
this.startSuperIDEHome();
}
async startSuperIDEHome() {
vscode.commands.executeCommand('superide.showHome');
}
registerGlobalCommands(context: vscode.ExtensionContext) {
context.subscriptions.push(
vscode.commands.registerCommand('superide.showHome', (url: string) =>
this.siHome.toggle(url)
),
);
}
}
export function activate(context: vscode.ExtensionContext) {
return new SuperIDEExtension(context);
}
export function deactivate() {
}