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

Eliminate CommonCodeEditor

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