mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 17:23:21 -05:00
Put export as SQL/Notebook under preview flag (#11726)
* Put export as SQL/Notebook under preview flag * add sqlcmd under preview * Remove comment
This commit is contained in:
@@ -256,26 +256,31 @@ export class QueryEditor extends BaseEditor {
|
||||
|
||||
private setTaskbarContent(): void {
|
||||
// Create HTML Elements for the taskbar
|
||||
let separator = Taskbar.createTaskbarSeparator();
|
||||
|
||||
// Set the content in the order we desire
|
||||
let content: ITaskbarContent[] = [
|
||||
{ action: this._runQueryAction },
|
||||
{ action: this._cancelQueryAction },
|
||||
{ element: separator },
|
||||
{ action: this._toggleConnectDatabaseAction },
|
||||
{ action: this._changeConnectionAction },
|
||||
{ action: this._listDatabasesAction },
|
||||
{ element: separator },
|
||||
{ action: this._estimatedQueryPlanAction },
|
||||
{ action: this._toggleSqlcmdMode },
|
||||
{ action: this._exportAsNotebookAction }
|
||||
];
|
||||
|
||||
// Remove the estimated query plan action if preview features are not enabled
|
||||
let previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||
if (!previewFeaturesEnabled) {
|
||||
content.splice(7, 1);
|
||||
const separator = Taskbar.createTaskbarSeparator();
|
||||
let content: ITaskbarContent[];
|
||||
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||
if (previewFeaturesEnabled) {
|
||||
content = [
|
||||
{ action: this._runQueryAction },
|
||||
{ action: this._cancelQueryAction },
|
||||
{ element: separator },
|
||||
{ action: this._toggleConnectDatabaseAction },
|
||||
{ action: this._changeConnectionAction },
|
||||
{ action: this._listDatabasesAction },
|
||||
{ element: separator },
|
||||
{ action: this._estimatedQueryPlanAction }, // Preview
|
||||
{ action: this._toggleSqlcmdMode }, // Preview
|
||||
{ action: this._exportAsNotebookAction } // Preview
|
||||
];
|
||||
} else {
|
||||
content = [
|
||||
{ action: this._runQueryAction },
|
||||
{ action: this._cancelQueryAction },
|
||||
{ element: separator },
|
||||
{ action: this._toggleConnectDatabaseAction },
|
||||
{ action: this._changeConnectionAction },
|
||||
{ action: this._listDatabasesAction }
|
||||
];
|
||||
}
|
||||
|
||||
this.taskbar.setContent(content);
|
||||
|
||||
Reference in New Issue
Block a user