mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Adding group by schema button to OE (#22083)
This commit is contained in:
@@ -31,3 +31,5 @@ export const configObjectExplorerGroupBySchemaFlagName = 'mssql.objectExplorer.g
|
||||
// COMMANDNAMES //////////////////////////////////////////////////////////
|
||||
export const cmdObjectExplorerEnableGroupBySchemaCommand = 'mssql.enableGroupBySchema';
|
||||
export const cmdObjectExplorerDisableGroupBySchemaCommand = 'mssql.disableGroupBySchema';
|
||||
export const cmdObjectExplorerEnabbleGroupBySchemaTitleCommand = 'mssql.enableGroupBySchemaTitle';
|
||||
export const cmdObjectExplorerDisableGroupBySchemaTitleCommand = 'mssql.disableGroupBySchemaTitle';
|
||||
|
||||
@@ -90,10 +90,22 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerEnableGroupBySchemaCommand, async () => {
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.EnableGroupBySchemaContextMenu)
|
||||
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, true, true);
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerDisableGroupBySchemaCommand, async () => {
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.DisableGroupBySchemaContextMenu)
|
||||
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, false, true);
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand, async () => {
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.EnableGroupByServerViewTitleAction)
|
||||
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, true, true);
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand(Constants.cmdObjectExplorerDisableGroupBySchemaTitleCommand, async () => {
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.MssqlObjectExplorer, TelemetryActions.DisableGroupByServerViewTitleAction)
|
||||
await vscode.workspace.getConfiguration().update(Constants.configObjectExplorerGroupBySchemaFlagName, false, true);
|
||||
}));
|
||||
|
||||
|
||||
@@ -84,4 +84,8 @@ export enum TelemetryViews {
|
||||
export enum TelemetryActions {
|
||||
GroupBySchemaEnabled = 'objectExplorerGroupBySchemaEnabled',
|
||||
GroupBySchemaDisabled = 'objectExplorerGroupBySchemaDisabled',
|
||||
EnableGroupBySchemaContextMenu = 'objectExplorerEnableGroupBySchemaContextMenu',
|
||||
DisableGroupBySchemaContextMenu = 'objectExplorerDisableGroupBySchemaContextMenu',
|
||||
EnableGroupByServerViewTitleAction = 'objectExplorerEnableGroupByServerViewTitleAction',
|
||||
DisableGroupByServerViewTitleAction = 'objectExplorerDisableGroupByServerViewTitleAction',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user