提交 9799b57a 编写于 作者: B Benjamin Pasero

DiffEditorInput => BaseDiffEditorInput

上级 b3f68a5d
......@@ -8,7 +8,7 @@ import {TPromise} from 'vs/base/common/winjs.base';
import types = require('vs/base/common/types');
import {isBinaryMime} from 'vs/base/common/mime';
import {EventType} from 'vs/base/common/events';
import {EditorModel, IFileEditorInput, EditorInput, IInputStatus, DiffEditorInput as CommonDiffEditorInput} from 'vs/workbench/common/editor';
import {EditorModel, IFileEditorInput, EditorInput, IInputStatus, BaseDiffEditorInput} from 'vs/workbench/common/editor';
import {BaseTextEditorModel} from 'vs/workbench/browser/parts/editor/textEditorModel';
import {DiffEditorModel} from 'vs/workbench/browser/parts/editor/diffEditorModel';
import {TextDiffEditor} from 'vs/workbench/browser/parts/editor/textDiffEditor';
......@@ -20,7 +20,7 @@ import {BinaryResourceDiffEditor} from 'vs/workbench/browser/parts/editor/binary
* The base editor input for the diff editor. It is made up of two editor inputs, the original version
* and the modified version.
*/
export class DiffEditorInput extends CommonDiffEditorInput {
export class DiffEditorInput extends BaseDiffEditorInput {
public static ID = 'workbench.editors.diffEditorInput';
......
......@@ -125,7 +125,7 @@ export abstract class EditorInput extends EventEmitter implements IEditorInput {
/**
* The base class of editor inputs that have an original and modified side.
*/
export abstract class DiffEditorInput extends EditorInput {
export abstract class BaseDiffEditorInput extends EditorInput {
private _originalInput: EditorInput;
private _modifiedInput: EditorInput;
......@@ -477,8 +477,8 @@ export function asFileEditorInput(obj: any, supportDiff?: boolean): IFileEditorI
}
// Check for diff if we are asked to
if (supportDiff && types.isFunction((<DiffEditorInput>obj).getModifiedInput)) {
obj = (<DiffEditorInput>obj).getModifiedInput();
if (supportDiff && types.isFunction((<BaseDiffEditorInput>obj).getModifiedInput)) {
obj = (<BaseDiffEditorInput>obj).getModifiedInput();
}
let i = <IFileEditorInput>obj;
......
......@@ -2068,8 +2068,8 @@ export class CloseFileAction extends Action {
// Otherwise just dispose
else {
if (input instanceof workbenchEditorCommon.DiffEditorInput) {
input = (<workbenchEditorCommon.DiffEditorInput>input).getModifiedInput();
if (input instanceof DiffEditorInput) {
input = (<DiffEditorInput>input).getModifiedInput();
}
// File Input
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册