提交 31e42aac 编写于 作者: B Benjamin Pasero

grid - fix issue with delegating editor service

上级 61ad2106
......@@ -40,6 +40,7 @@ import { getCodeOrDiffEditor } from 'vs/editor/browser/services/codeEditorServic
import { once } from 'vs/base/common/event';
import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/nextEditorService';
import { INextEditorGroup, INextEditorGroupsService } from 'vs/workbench/services/group/common/nextEditorGroupsService';
import { INextEditorService } from 'vs/workbench/services/editor/common/nextEditorService';
/**
* The text editor that leverages the diff text editor for the editing experience.
......@@ -122,7 +123,7 @@ export class TextDiffEditor extends BaseTextEditor {
});
// Create a special child of instantiator that will delegate all calls to openEditor() to the same diff editor if the input matches with the modified one
const diffEditorInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService]));
const diffEditorInstantiator = this.instantiationService.createChild(new ServiceCollection([INextEditorService, delegatingEditorService]));
return diffEditorInstantiator.createInstance(DiffEditorWidget, parent, configuration);
}
......
......@@ -24,7 +24,6 @@ import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/common/views';
......@@ -218,7 +217,7 @@ export class ExplorerViewlet extends PersistentViewsViewlet implements IExplorer
return this.nextEditorService.openEditor(editor, options, group).then(onSuccessOrError, onSuccessOrError);
});
const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService]));
const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([INextEditorService, delegatingEditorService]));
return explorerInstantiator.createInstance(ExplorerView, <IExplorerViewOptions>{ ...options, viewletState: this.viewletState });
}
return super.createView(viewDescriptor, options);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册