mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Fix access to query editor configuration (#11321)
* fix access to query editor configuration * fix configuration type * fix setting type
This commit is contained in:
@@ -18,6 +18,7 @@ import { ExecutionPlanOptions } from 'azdata';
|
||||
import { startsWith } from 'vs/base/common/strings';
|
||||
import { IRange } from 'vs/editor/common/core/range';
|
||||
import { AbstractTextResourceEditorInput } from 'vs/workbench/common/editor/textResourceEditorInput';
|
||||
import { IQueryEditorConfiguration } from 'sql/platform/query/common/query';
|
||||
|
||||
const MAX_SIZE = 13;
|
||||
|
||||
@@ -156,7 +157,7 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
|
||||
}));
|
||||
|
||||
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectedKeys.indexOf('sql.showConnectionInfoInTitle') > -1) {
|
||||
if (e.affectedKeys.indexOf('queryEditor') > -1) {
|
||||
this._onDidChangeLabel.fire();
|
||||
}
|
||||
}));
|
||||
@@ -196,7 +197,7 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab
|
||||
public get resource(): URI { return this._text.resource; }
|
||||
|
||||
public getName(longForm?: boolean): string {
|
||||
if (this.configurationService.getValue('sql.showConnectionInfoInTitle')) {
|
||||
if (this.configurationService.getValue<IQueryEditorConfiguration>('queryEditor').showConnectionInfoInTitle) {
|
||||
let profile = this.connectionManagementService.getConnectionProfile(this.uri);
|
||||
let title = '';
|
||||
if (this._description && this._description !== '') {
|
||||
|
||||
Reference in New Issue
Block a user