mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 11:08:31 -05:00
Isolate more features (#6854)
* working; new query and scripting * working; removing manage from menus and combining data explorer contributions * consolidate dashboard contributions; move manage action to dashboard contributions; make groupings the same * fix notebook actions not firing * fix notebook actions * notebooks working * move backup and restore entry points into their own file; move explorerwidget contribution into their respective files * fix tests * move extension actions to their own file * fix tests * change tests
This commit is contained in:
@@ -36,6 +36,9 @@ import { SqlFlavorStatusbarItem } from 'sql/workbench/parts/query/browser/flavor
|
||||
import { NewQueryTask, OE_NEW_QUERY_ACTION_ID, DE_NEW_QUERY_COMMAND_ID } from 'sql/workbench/parts/query/browser/queryActions';
|
||||
import { TreeNodeContextKey } from 'sql/workbench/parts/objectExplorer/common/treeNodeContextKey';
|
||||
import { MssqlNodeContext } from 'sql/workbench/parts/dataExplorer/common/mssqlNodeContext';
|
||||
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { ManageActionContext } from 'sql/workbench/common/actions';
|
||||
import { ItemContextKey } from 'sql/workbench/parts/dashboard/browser/widgets/explorer/explorerTreeContext';
|
||||
|
||||
const gridCommandsWeightBonus = 100; // give our commands a little bit more weight over other default list/tree commands
|
||||
|
||||
@@ -88,6 +91,21 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
||||
when: MssqlNodeContext.IsDatabaseOrServer
|
||||
});
|
||||
|
||||
const ExplorerNewQueryActionID = 'explorer.query';
|
||||
CommandsRegistry.registerCommand(ExplorerNewQueryActionID, (accessor, context: ManageActionContext) => {
|
||||
const commandService = accessor.get(ICommandService);
|
||||
return commandService.executeCommand(NewQueryTask.ID, context.profile);
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.ExplorerWidgetContext, {
|
||||
command: {
|
||||
id: ExplorerNewQueryActionID,
|
||||
title: NewQueryTask.LABEL
|
||||
},
|
||||
when: ItemContextKey.ItemType.isEqualTo('database'),
|
||||
order: 1
|
||||
});
|
||||
|
||||
// Query Actions
|
||||
actionRegistry.registerWorkbenchAction(
|
||||
new SyncActionDescriptor(
|
||||
|
||||
Reference in New Issue
Block a user