提交 ff65a335 编写于 作者: B Benjamin Pasero

editors - reduce close exposure for now

上级 1927f9b6
......@@ -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<EditorModel | null> {
return null;
}
matches(otherInput: unknown): boolean {
if (super.matches(otherInput) === true) {
return true;
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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();
......
......@@ -99,10 +99,6 @@ export class WebviewInput extends EditorInput {
this._group = group;
}
public async resolve(): Promise<null> {
return null;
}
public supportsSplitEditor() {
return false;
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册