mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 09:35:37 -05:00
* add sample for server reports * add license and headers for all samples * add new icons for sp_whoisactive * address comments and use sqlops node module
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
'use strict';
|
|
|
|
import * as vscode from 'vscode';
|
|
|
|
import ControllerBase from './controllers/controllerBase';
|
|
import MainController from './controllers/mainController';
|
|
|
|
let controllers: ControllerBase[] = [];
|
|
|
|
export function activate(context: vscode.ExtensionContext): Promise<boolean> {
|
|
let activations: Promise<boolean>[] = [];
|
|
|
|
// Start the main controller
|
|
let mainController = new MainController(context);
|
|
controllers.push(mainController);
|
|
context.subscriptions.push(mainController);
|
|
activations.push(mainController.activate());
|
|
|
|
return Promise.all(activations)
|
|
.then((results: boolean[]) => {
|
|
for (let result of results) {
|
|
if (!result) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
});
|
|
}
|
|
|
|
export function deactivate(): void {
|
|
for (let controller of controllers) {
|
|
controller.deactivate();
|
|
}
|
|
}
|