提交 9a7a8f1d 编写于 作者: B Benjamin Pasero

Cannot read property 'getActiveEditor' of undefined (fixes #6008)

上级 bf6b01b7
......@@ -131,12 +131,20 @@ export class EditorPart extends Part implements IEditorPart {
}
public getActiveEditorInput(): EditorInput {
if (!this.sideBySideControl) {
return null; // too early
}
let lastActiveEditor = this.sideBySideControl.getActiveEditor();
return lastActiveEditor ? lastActiveEditor.input : null;
}
public getActiveEditor(): BaseEditor {
if (!this.sideBySideControl) {
return null; // too early
}
return this.sideBySideControl.getActiveEditor();
}
......@@ -753,9 +761,7 @@ export class EditorPart extends Part implements IEditorPart {
}
private createEditor(editorDescriptor: EditorDescriptor, editorDomNode: HTMLElement, position: Position): TPromise<BaseEditor> {
let progressService = new WorkbenchProgressService(this.eventService, this.sideBySideControl.getProgressBar(position), editorDescriptor.getId(), true);
let editorInstantiationService = this.instantiationService.createChild(new ServiceCollection([IProgressService, progressService]));
return editorInstantiationService.createInstance(editorDescriptor);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册