diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 59f12493062..22caaaa4e86 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -598,6 +598,9 @@ export abstract class EditorInput extends Disposable implements IEditorInput { close(group: GroupIdentifier, openedInOtherGroups: boolean): void { // TODO@ben revisit this behaviour, should just dispose by default after adoption + // However this requires that we never open the same input in multiple editor groups + // which today we cannot enforce (e.g. when opening the same editor in an empty + // group via quick open editor history) if (!openedInOtherGroups) { this.dispose(); } @@ -798,10 +801,6 @@ export class SideBySideEditorInput extends EditorInput { this._register(this.master.onDidChangeLabel(() => this._onDidChangeLabel.fire())); } - async resolve(): Promise { - return null; - } - matches(otherInput: unknown): boolean { if (super.matches(otherInput) === true) { return true; diff --git a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts index c40a9f95f48..8fa384f074a 100644 --- a/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts +++ b/src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsInput.ts @@ -5,7 +5,7 @@ import * as nls from 'vs/nls'; import { URI } from 'vs/base/common/uri'; -import { EditorInput, GroupIdentifier } from 'vs/workbench/common/editor'; +import { EditorInput } from 'vs/workbench/common/editor'; export class RuntimeExtensionsInput extends EditorInput { @@ -37,12 +37,6 @@ export class RuntimeExtensionsInput extends EditorInput { return false; } - close(group: GroupIdentifier, openedInOtherGroups: boolean): void { - if (!openedInOtherGroups) { - this.dispose(); // Only dispose if not opened anymore because all runtime extensions inputs are shared - } - } - matches(other: unknown): boolean { return other instanceof RuntimeExtensionsInput; } diff --git a/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts b/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts index d59090dc55c..d338237cde4 100644 --- a/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/contrib/files/common/editors/fileEditorInput.ts @@ -303,12 +303,6 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements return undefined; } - close(group: GroupIdentifier, openedInOtherGroups: boolean): void { - if (!openedInOtherGroups) { - this.dispose(); // Only dispose if not opened anymore because all file inputs are shared - } - } - matches(otherInput: unknown): boolean { if (super.matches(otherInput) === true) { return true; diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts index 5178fcbba70..3d1f4407810 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts @@ -180,10 +180,6 @@ export class SearchEditorInput extends EditorInput { return localize('searchTitle', "Search"); } - async resolve() { - return null; - } - setDirty(dirty: boolean) { this.dirty = dirty; this._onDidChangeDirty.fire(); diff --git a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts index cee6146281e..c5b4ebcd05e 100644 --- a/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts +++ b/src/vs/workbench/contrib/webview/browser/webviewEditorInput.ts @@ -99,10 +99,6 @@ export class WebviewInput extends EditorInput { this._group = group; } - public async resolve(): Promise { - return null; - } - public supportsSplitEditor() { return false; } diff --git a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts index b84026d012a..7ecff1fba99 100644 --- a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts +++ b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IEncodingSupport, EncodingMode, Verbosity, IModeSupport, GroupIdentifier } from 'vs/workbench/common/editor'; +import { IEncodingSupport, EncodingMode, Verbosity, IModeSupport } from 'vs/workbench/common/editor'; import { AbstractTextResourceEditorInput } from 'vs/workbench/common/editor/textResourceEditorInput'; import { IUntitledTextEditorModel } from 'vs/workbench/services/untitled/common/untitledTextEditorModel'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -121,12 +121,6 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return this.modelResolve; } - close(group: GroupIdentifier, openedInOtherGroups: boolean): void { - if (!openedInOtherGroups) { - this.dispose(); // Only dispose if not opened anymore because all untitled inputs are shared - } - } - matches(otherInput: unknown): boolean { if (super.matches(otherInput) === true) { return true;