Merge from vscode 9bc92b48d945144abb405b9e8df05e18accb9148

This commit is contained in:
ADS Merger
2020-02-19 03:11:35 +00:00
parent 98584d32a7
commit 1e308639e5
253 changed files with 6414 additions and 2296 deletions

View File

@@ -96,12 +96,12 @@ export class SqlFlavorStatusbarItem extends Disposable implements IWorkbenchCont
}
private _onEditorClosed(event: IEditorCloseEvent): void {
let uri = event.editor.getResource().toString();
let uri = event.editor.resource.toString();
if (uri && uri in this._sqlStatusEditors) {
// If active editor is being closed, hide the query status.
let activeEditor = this.editorService.activeControl;
if (activeEditor) {
let currentUri = activeEditor.input.getResource().toString();
let currentUri = activeEditor.input.resource.toString();
if (uri === currentUri) {
this.hide();
}
@@ -114,7 +114,7 @@ export class SqlFlavorStatusbarItem extends Disposable implements IWorkbenchCont
private _onEditorsChanged(): void {
let activeEditor = this.editorService.activeControl;
if (activeEditor) {
let uri = activeEditor.input.getResource().toString();
let uri = activeEditor.input.resource.toString();
// Show active editor's language flavor status
if (uri) {
@@ -145,7 +145,7 @@ export class SqlFlavorStatusbarItem extends Disposable implements IWorkbenchCont
private _showStatus(uri: string): void {
let activeEditor = this.editorService.activeControl;
if (activeEditor) {
let currentUri = activeEditor.input.getResource().toString();
let currentUri = activeEditor.input.resource.toString();
if (uri === currentUri) {
let flavor: SqlProviderEntry = this._sqlStatusEditors[uri];
if (flavor) {
@@ -186,7 +186,7 @@ export class ChangeFlavorAction extends Action {
public run(): Promise<any> {
let activeEditor = this._editorService.activeControl;
let currentUri = activeEditor?.input.getResource().toString();
let currentUri = activeEditor?.input.resource.toString();
if (this._connectionManagementService.isConnected(currentUri)) {
let currentProvider = this._connectionManagementService.getProviderIdFromUri(currentUri);
return this._showMessage(Severity.Info, nls.localize('alreadyConnected',
@@ -226,4 +226,3 @@ export class ChangeFlavorAction extends Action {
return Promise.resolve(undefined);
}
}

View File

@@ -105,7 +105,7 @@ export class QueryEditor extends BaseEditor {
this.queryEditorVisible = queryContext.QueryEditorVisibleContext.bindTo(contextKeyService);
// Clear view state for deleted files
this._register(fileService.onFileChanges(e => this.onFilesChanged(e)));
this._register(fileService.onDidFilesChange(e => this.onFilesChanged(e)));
}
private onFilesChanged(e: FileChangesEvent): void {
@@ -317,7 +317,7 @@ export class QueryEditor extends BaseEditor {
this.inputDisposables.add(this.input.state.onChange(c => this.updateState(c)));
this.updateState({ connectingChange: true, connectedChange: true, executingChange: true, resultsVisibleChange: true, sqlCmdModeChanged: true });
const editorViewState = this.loadTextEditorViewState(this.input.getResource());
const editorViewState = this.loadTextEditorViewState(this.input.resource);
if (editorViewState && editorViewState.resultsHeight && this.splitview.length > 1) {
this.splitview.resizeView(1, editorViewState.resultsHeight);
@@ -331,7 +331,7 @@ export class QueryEditor extends BaseEditor {
// Otherwise we save the view state to restore it later
else if (!input.isDisposed()) {
this.saveTextEditorViewState(input.getResource());
this.saveTextEditorViewState(input.resource);
}
}