提交 37c7bdb4 编写于 作者: A Alex Dima

Eliminate CommonCodeEditor

上级 6c819481
......@@ -11,7 +11,7 @@ import { IEditorMouseEvent } from 'vs/editor/browser/editorBrowser';
import { IViewModel } from 'vs/editor/common/viewModel/viewModel';
import { ViewOutgoingEvents } from 'vs/editor/browser/view/viewOutgoingEvents';
import { CoreNavigationCommands, CoreEditorCommand } from 'vs/editor/browser/controller/coreCommands';
import { Configuration } from 'vs/editor/browser/config/configuration';
import { IConfiguration } from 'vs/editor/common/editorCommon';
export interface ExecCoreEditorCommandFunc {
(editorCommand: CoreEditorCommand, args: any): void;
......@@ -47,14 +47,14 @@ export interface ICommandDelegate {
export class ViewController {
private readonly configuration: Configuration;
private readonly configuration: IConfiguration;
private readonly viewModel: IViewModel;
private readonly _execCoreEditorCommandFunc: ExecCoreEditorCommandFunc;
private readonly outgoingEvents: ViewOutgoingEvents;
private readonly commandDelegate: ICommandDelegate;
constructor(
configuration: Configuration,
configuration: IConfiguration,
viewModel: IViewModel,
execCommandFunc: ExecCoreEditorCommandFunc,
outgoingEvents: ViewOutgoingEvents,
......
......@@ -10,7 +10,7 @@ import * as dom from 'vs/base/browser/dom';
import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode';
import { Range } from 'vs/editor/common/core/range';
import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler';
import { Configuration } from 'vs/editor/browser/config/configuration';
import { IConfiguration } from 'vs/editor/common/editorCommon';
import { TextAreaHandler, ITextAreaHandlerHelper } from 'vs/editor/browser/controller/textAreaHandler';
import { PointerHandler } from 'vs/editor/browser/controller/pointerHandler';
import * as editorBrowser from 'vs/editor/browser/editorBrowser';
......@@ -93,7 +93,7 @@ export class View extends ViewEventHandler {
constructor(
commandDelegate: ICommandDelegate,
configuration: Configuration,
configuration: IConfiguration,
themeService: IThemeService,
model: IViewModel,
cursor: Cursor,
......
此差异已折叠。
......@@ -90,6 +90,9 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed
this._register(TabFocus.onDidChangeTabFocus(_ => this._recomputeOptions()));
}
public observeReferenceElement(dimension?: editorCommon.IDimension): void {
}
public dispose(): void {
super.dispose();
}
......
......@@ -150,12 +150,16 @@ export interface ILineChange extends IChange {
/**
* @internal
*/
export interface IConfiguration {
export interface IConfiguration extends IDisposable {
onDidChange(listener: (e: editorOptions.IConfigurationChangedEvent) => void): IDisposable;
readonly editor: editorOptions.InternalEditorOptions;
setMaxLineNumber(maxLineNumber: number): void;
updateOptions(newOptions: editorOptions.IEditorOptions): void;
getRawOptions(): editorOptions.IEditorOptions;
observeReferenceElement(dimension?: IDimension): void;
setIsDominatedByLongLines(isDominatedByLongLines: boolean): void;
}
// --- view
......
......@@ -8,7 +8,6 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService';
import { IContextKeyService, IContextKeyServiceTarget } from 'vs/platform/contextkey/common/contextkey';
import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService';
import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig';
import { Cursor } from 'vs/editor/common/controller/cursor';
import * as editorCommon from 'vs/editor/common/editorCommon';
import * as editorBrowser from 'vs/editor/browser/editorBrowser';
......@@ -37,7 +36,7 @@ export class TestCodeEditor extends CodeEditorWidget implements editorBrowser.IC
}
//#region testing overrides
protected _createConfiguration(options: editorOptions.IEditorOptions): CommonEditorConfiguration {
protected _createConfiguration(options: editorOptions.IEditorOptions): editorCommon.IConfiguration {
return new TestConfiguration(options);
}
protected _createView(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册