mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
add azdata open extension command (#9573)
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
|
||||||
|
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||||
|
|
||||||
|
CommandsRegistry.registerCommand('azdata.extension.open', (accessor: ServicesAccessor, extension: { id: string }) => {
|
||||||
|
if (extension && extension.id) {
|
||||||
|
const commandService = accessor.get(ICommandService);
|
||||||
|
return commandService.executeCommand('extension.open', extension.id);
|
||||||
|
} else {
|
||||||
|
throw new Error('Extension id is not provided');
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -470,4 +470,7 @@ import 'sql/workbench/contrib/scripting/browser/scripting.contribution';
|
|||||||
// Resource Deployment
|
// Resource Deployment
|
||||||
import 'sql/workbench/contrib/resourceDeployment/browser/resourceDeployment.contribution';
|
import 'sql/workbench/contrib/resourceDeployment/browser/resourceDeployment.contribution';
|
||||||
|
|
||||||
|
// Extension
|
||||||
|
import 'sql/workbench/contrib/extensions/browser/extensions.contribution';
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user