Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae

This commit is contained in:
ADS Merger
2020-06-18 04:32:54 +00:00
committed by AzureDataStudio
parent a971aee5bd
commit 5e7071e466
1002 changed files with 24201 additions and 13193 deletions

View File

@@ -15,9 +15,7 @@ import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel'
import { ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles';
import { URI } from 'vs/base/common/uri';
type PublicPart<T> = { [K in keyof T]: T[K] };
export class FileQueryEditorInput extends QueryEditorInput implements PublicPart<FileEditorInput> {
export class FileQueryEditorInput extends QueryEditorInput {
public static readonly ID = 'workbench.editorInput.fileQueryInput';
@@ -84,7 +82,7 @@ export class FileQueryEditorInput extends QueryEditorInput implements PublicPart
return this.text.isResolved();
}
public move(group: GroupIdentifier, target: URI): IMoveResult {
return this.text.move(group, target);
public rename(group: GroupIdentifier, target: URI): IMoveResult {
return this.text.rename(group, target);
}
}

View File

@@ -36,7 +36,7 @@ suite('Query Input Factory', () => {
instantiationService.stub(IConnectionManagementService, connectionManagementService);
instantiationService.stub(IEditorService, editorService);
const queryEditorLanguageAssociation = instantiationService.createInstance(QueryEditorLanguageAssociation);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined, undefined);
queryEditorLanguageAssociation.convertInput(input);
assert(connectionManagementService.numberConnects === 1, 'Convert input should have called connect when active OE connection exists');
});
@@ -49,7 +49,7 @@ suite('Query Input Factory', () => {
instantiationService.stub(IConnectionManagementService, connectionManagementService);
instantiationService.stub(IEditorService, editorService);
const queryEditorLanguageAssociation = instantiationService.createInstance(QueryEditorLanguageAssociation);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined, undefined);
const response = queryEditorLanguageAssociation.convertInput(input);
assert(isThenable(response));
await response;
@@ -64,7 +64,7 @@ suite('Query Input Factory', () => {
instantiationService.stub(IConnectionManagementService, connectionManagementService);
instantiationService.stub(IEditorService, editorService);
const queryEditorLanguageAssociation = instantiationService.createInstance(QueryEditorLanguageAssociation);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined, undefined);
queryEditorLanguageAssociation.convertInput(input);
assert(connectionManagementService.numberConnects === 1, 'Convert input should have called connect when active editor connection exists');
});
@@ -77,7 +77,7 @@ suite('Query Input Factory', () => {
instantiationService.stub(IConnectionManagementService, connectionManagementService);
instantiationService.stub(IEditorService, editorService);
const queryEditorLanguageAssociation = instantiationService.createInstance(QueryEditorLanguageAssociation);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined, undefined);
const response = queryEditorLanguageAssociation.convertInput(input);
assert(isThenable(response));
await response;
@@ -115,7 +115,7 @@ suite('Query Input Factory', () => {
instantiationService.stub(IConnectionManagementService, connectionManagementService);
instantiationService.stub(IEditorService, editorService);
const queryEditorLanguageAssociation = instantiationService.createInstance(QueryEditorLanguageAssociation);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined, undefined);
queryEditorLanguageAssociation.syncConvertinput(input);
assert(connectionManagementService.numberConnects === 0, 'Convert input should not have been called connect when no global connections exist');
});
@@ -127,7 +127,7 @@ suite('Query Input Factory', () => {
instantiationService.stub(IConnectionManagementService, connectionManagementService);
instantiationService.stub(IEditorService, editorService);
const queryEditorLanguageAssociation = instantiationService.createInstance(QueryEditorLanguageAssociation);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined);
const input = instantiationService.createInstance(FileEditorInput, URI.file('/test/file.sql'), undefined, undefined, undefined);
const response = queryEditorLanguageAssociation.convertInput(input);
assert(isThenable(response));
await response;