mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 01:25:39 -05:00
allow registering options source providers to resource-deployment (#12712)
* first draft * compile fixes * uncomment code * waitForAzdataToolDisovery added to azdata api * missed change in last commit * remove switchReturn * contributeOptionsSource renamed * remove switchReturn reference * create optionSourceService * azdataTool usage more reliable * package.json fixes and cleanup * cleanup * revert 4831a6e6b8b08684488b2c9e18092fa252e3057f * pr feedback * pr feedback * pr feedback * cleanup * cleanup * fix eulaAccepted check * fix whitespade in doc comments.
This commit is contained in:
@@ -12,10 +12,12 @@ import { ResourceTypeService } from './services/resourceTypeService';
|
||||
import { ToolsService } from './services/toolsService';
|
||||
import { DeploymentInputDialog } from './ui/deploymentInputDialog';
|
||||
import { ResourceTypePickerDialog } from './ui/resourceTypePickerDialog';
|
||||
import * as rd from 'resource-deployment';
|
||||
import { getExtensionApi } from './api';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<rd.IExtension> {
|
||||
const platformService = new PlatformService(context.globalStoragePath);
|
||||
await platformService.initialize();
|
||||
const toolsService = new ToolsService(platformService);
|
||||
@@ -27,7 +29,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||
const errorMessage = localize('resourceDeployment.FailedToLoadExtension', "Failed to load extension: {0}, Error detected in the resource type definition in package.json, check debug console for details.", context.extensionPath);
|
||||
vscode.window.showErrorMessage(errorMessage);
|
||||
validationFailures.forEach(message => console.error(message));
|
||||
return;
|
||||
return <any>undefined;
|
||||
}
|
||||
/**
|
||||
* Opens a new ResourceTypePickerDialog
|
||||
@@ -73,6 +75,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||
const dialog = new DeploymentInputDialog(notebookService, platformService, toolsService, dialogInfo);
|
||||
dialog.open();
|
||||
});
|
||||
return getExtensionApi();
|
||||
}
|
||||
|
||||
// this method is called when your extension is deactivated
|
||||
|
||||
Reference in New Issue
Block a user