Fix access to query editor configuration (#11321)

* fix access to query editor configuration

* fix configuration type

* fix setting type
This commit is contained in:
Anthony Dresser
2020-07-13 13:05:36 -07:00
committed by GitHub
parent ff979f90d1
commit 286c021df9
6 changed files with 14 additions and 23 deletions

View File

@@ -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 !== '') {