Add connection info to title (#1645)

* add connection info to the file label

* formatting

* first attempt at title shortening

* add user to title shortening

* add settings to control connection info in title

* formatting

* move setting
This commit is contained in:
Anthony Dresser
2018-06-29 17:04:09 -07:00
committed by GitHub
parent 4bd63b615b
commit 2d80d5e611
6 changed files with 99 additions and 50 deletions

View File

@@ -114,14 +114,14 @@ suite('SQL QueryEditor Tests', () => {
let uri: URI = URI.parse(filePath);
let fileInput = new UntitledEditorInput(uri, false, '', '', '', instantiationService.object, undefined, undefined, undefined, undefined);
let queryResultsInput: QueryResultsInput = new QueryResultsInput(uri.fsPath);
queryInput = new QueryInput('first', 'first', fileInput, queryResultsInput, undefined, undefined, undefined, undefined);
queryInput = new QueryInput('first', fileInput, queryResultsInput, undefined, undefined, undefined, undefined, undefined);
// Create a QueryInput to compare to the previous one
let filePath2 = 'someFile2.sql';
let uri2: URI = URI.parse(filePath2);
let fileInput2 = new UntitledEditorInput(uri2, false, '', '', '', instantiationService.object, undefined, undefined, undefined, undefined);
let queryResultsInput2: QueryResultsInput = new QueryResultsInput(uri2.fsPath);
queryInput2 = new QueryInput('second', 'second', fileInput2, queryResultsInput2, undefined, undefined, undefined, undefined);
queryInput2 = new QueryInput('second', fileInput2, queryResultsInput2, undefined, undefined, undefined, undefined, undefined);
// Mock IMessageService
notificationService = TypeMoq.Mock.ofType(TestNotificationService, TypeMoq.MockBehavior.Loose);
@@ -346,13 +346,13 @@ suite('SQL QueryEditor Tests', () => {
queryModelService = TypeMoq.Mock.ofType(QueryModelService, TypeMoq.MockBehavior.Loose, undefined, undefined);
queryModelService.callBase = true;
queryInput = new QueryInput(
'testUri',
'',
fileInput,
undefined,
undefined,
undefined,
queryModelService.object,
undefined,
undefined
);
});