mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
update parse query action (#22577)
* update parse query action * revert export notebook change * comment
This commit is contained in:
@@ -48,6 +48,7 @@ import { IActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { gen3Version, sqlDataWarehouse } from 'sql/platform/connection/common/constants';
|
||||
import { Dropdown } from 'sql/base/browser/ui/editableDropdown/browser/dropdown';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { Codicon } from 'vs/base/common/codicons';
|
||||
|
||||
/**
|
||||
* Action class that query-based Actions will extend. This base class automatically handles activating and
|
||||
@@ -916,8 +917,7 @@ export class ExportAsNotebookAction extends QueryTaskbarAction {
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@ICommandService private _commandService: ICommandService
|
||||
) {
|
||||
super(connectionManagementService, editor, ConnectDatabaseAction.ID, ExportAsNotebookAction.IconClass);
|
||||
|
||||
super(connectionManagementService, editor, ExportAsNotebookAction.ID, ExportAsNotebookAction.IconClass);
|
||||
this.label = nls.localize('queryEditor.exportSqlAsNotebook', "Export as Notebook");
|
||||
}
|
||||
|
||||
@@ -929,3 +929,17 @@ export class ExportAsNotebookAction extends QueryTaskbarAction {
|
||||
export const CATEGORIES = {
|
||||
ExecutionPlan: { value: nls.localize('ExecutionPlan', 'Execution Plan'), original: 'Execution Plan' }
|
||||
};
|
||||
|
||||
// A wrapper for the ParseSyntaxAction.
|
||||
// We are not able to reference the ParseSyntaxAction directly in QueryEditor.ts because there is a circular dependency issue.
|
||||
// The command id is also defined here to avoid duplication.
|
||||
export const ParseSyntaxCommandId = 'parseQueryAction';
|
||||
export class ParseSyntaxTaskbarAction extends Action {
|
||||
constructor(@ICommandService private _commandService: ICommandService) {
|
||||
super(ParseSyntaxCommandId, nls.localize('queryEditor.parse', "Parse"), Codicon.check.classNames);
|
||||
}
|
||||
|
||||
public override async run(): Promise<void> {
|
||||
this._commandService.executeCommand(ParseSyntaxCommandId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user