mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix for File -> New Query (#11893)
Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
@@ -186,6 +186,12 @@ export class QueryEditor extends BaseEditor {
|
|||||||
this._actualQueryPlanAction = this.instantiationService.createInstance(actions.ActualQueryPlanAction, this);
|
this._actualQueryPlanAction = this.instantiationService.createInstance(actions.ActualQueryPlanAction, this);
|
||||||
this._toggleSqlcmdMode = this.instantiationService.createInstance(actions.ToggleSqlCmdModeAction, this, false);
|
this._toggleSqlcmdMode = this.instantiationService.createInstance(actions.ToggleSqlCmdModeAction, this, false);
|
||||||
this._exportAsNotebookAction = this.instantiationService.createInstance(actions.ExportAsNotebookAction, this);
|
this._exportAsNotebookAction = this.instantiationService.createInstance(actions.ExportAsNotebookAction, this);
|
||||||
|
this.setTaskbarContent();
|
||||||
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
||||||
|
if (e.affectsConfiguration('workbench.enablePreviewFeatures')) {
|
||||||
|
this.setTaskbarContent();
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -198,11 +204,6 @@ export class QueryEditor extends BaseEditor {
|
|||||||
if (this.input.state.connected) {
|
if (this.input.state.connected) {
|
||||||
this.listDatabasesActionItem.onConnected();
|
this.listDatabasesActionItem.onConnected();
|
||||||
this.setTaskbarContent();
|
this.setTaskbarContent();
|
||||||
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
||||||
if (e.affectsConfiguration('workbench.enablePreviewFeatures')) {
|
|
||||||
this.setTaskbarContent();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
} else {
|
} else {
|
||||||
this.listDatabasesActionItem.onDisconnect();
|
this.listDatabasesActionItem.onDisconnect();
|
||||||
}
|
}
|
||||||
@@ -258,7 +259,7 @@ export class QueryEditor extends BaseEditor {
|
|||||||
const separator = Taskbar.createTaskbarSeparator();
|
const separator = Taskbar.createTaskbarSeparator();
|
||||||
let content: ITaskbarContent[];
|
let content: ITaskbarContent[];
|
||||||
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||||
let connectionProfile = this.connectionManagementService.getConnectionProfile(this.input.uri);
|
let connectionProfile = this.connectionManagementService.getConnectionProfile(this.input?.uri);
|
||||||
|
|
||||||
// TODO: Make it more generic, some way for extensions to register the commands it supports
|
// TODO: Make it more generic, some way for extensions to register the commands it supports
|
||||||
if (connectionProfile?.providerName === 'KUSTO') {
|
if (connectionProfile?.providerName === 'KUSTO') {
|
||||||
|
|||||||
Reference in New Issue
Block a user