提交 48bc6705 编写于 作者: B Benjamin Pasero

remove unused

上级 1897d17b
......@@ -22,7 +22,6 @@ import {IEventService} from 'vs/platform/event/common/event';
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
import {IMessageService} from 'vs/platform/message/common/message';
import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService';
import {IModeService} from 'vs/editor/common/services/modeService';
import {IThemeService} from 'vs/workbench/services/themes/common/themeService';
/**
......@@ -44,10 +43,9 @@ export class StringEditor extends BaseTextEditor {
@IConfigurationService configurationService: IConfigurationService,
@IEventService eventService: IEventService,
@IWorkbenchEditorService editorService: IWorkbenchEditorService,
@IModeService modeService: IModeService,
@IThemeService themeService: IThemeService
) {
super(StringEditor.ID, telemetryService, instantiationService, contextService, storageService, messageService, configurationService, eventService, editorService, modeService, themeService);
super(StringEditor.ID, telemetryService, instantiationService, contextService, storageService, messageService, configurationService, eventService, editorService, themeService);
this.mapResourceToEditorViewState = Object.create(null);
......
......@@ -34,7 +34,6 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
import {ServiceCollection} from 'vs/platform/instantiation/common/serviceCollection';
import {IMessageService} from 'vs/platform/message/common/message';
import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService';
import {IModeService} from 'vs/editor/common/services/modeService';
import {RawContextKey, IContextKeyService, IContextKey} from 'vs/platform/contextkey/common/contextkey';
import {IThemeService} from 'vs/workbench/services/themes/common/themeService';
......@@ -62,11 +61,10 @@ export class TextDiffEditor extends BaseTextEditor {
@IConfigurationService configurationService: IConfigurationService,
@IEventService eventService: IEventService,
@IWorkbenchEditorService editorService: IWorkbenchEditorService,
@IModeService modeService: IModeService,
@IContextKeyService contextKeyService: IContextKeyService,
@IThemeService themeService: IThemeService
) {
super(TextDiffEditor.ID, telemetryService, instantiationService, contextService, storageService, messageService, configurationService, eventService, editorService, modeService, themeService);
super(TextDiffEditor.ID, telemetryService, instantiationService, contextService, storageService, messageService, configurationService, eventService, editorService, themeService);
this.textDiffEditorVisible = TextCompareEditorVisible.bindTo(contextKeyService);
}
......
......@@ -23,7 +23,6 @@ import {IInstantiationService} from 'vs/platform/instantiation/common/instantiat
import {IMessageService} from 'vs/platform/message/common/message';
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService';
import {IModeService} from 'vs/editor/common/services/modeService';
import {IThemeService} from 'vs/workbench/services/themes/common/themeService';
import {Selection} from 'vs/editor/common/core/selection';
......@@ -34,7 +33,7 @@ import {Selection} from 'vs/editor/common/core/selection';
export abstract class BaseTextEditor extends BaseEditor {
private editorControl: IEditor;
private _editorContainer: Builder;
private _hasPendingConfigurationChange = false;
private hasPendingConfigurationChange: boolean;
constructor(
id: string,
......@@ -46,13 +45,12 @@ export abstract class BaseTextEditor extends BaseEditor {
@IConfigurationService private configurationService: IConfigurationService,
@IEventService private _eventService: IEventService,
@IWorkbenchEditorService private _editorService: IWorkbenchEditorService,
@IModeService private _modeService: IModeService,
@IThemeService private _themeService: IThemeService
@IThemeService private themeService: IThemeService
) {
super(id, telemetryService);
this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.handleConfigurationChangeEvent(e.config)));
this.toUnbind.push(_themeService.onDidColorThemeChange(_ => this.handleConfigurationChangeEvent()));
this.toUnbind.push(themeService.onDidColorThemeChange(_ => this.handleConfigurationChangeEvent()));
}
public get instantiationService(): IInstantiationService {
......@@ -71,18 +69,30 @@ export abstract class BaseTextEditor extends BaseEditor {
return this._messageService;
}
public get eventService(): IEventService {
return this._eventService;
}
public get editorService() {
return this._editorService;
}
public get editorContainer(): Builder {
return this._editorContainer;
}
private handleConfigurationChangeEvent(configuration?: any): void {
if (this.isVisible()) {
this.applyConfiguration(configuration);
} else {
this._hasPendingConfigurationChange = true;
this.hasPendingConfigurationChange = true;
}
}
private consumePendingConfigurationChangeEvent(): void {
if (this._hasPendingConfigurationChange) {
if (this.hasPendingConfigurationChange) {
this.applyConfiguration(this.configurationService.getConfiguration());
this._hasPendingConfigurationChange = false;
this.hasPendingConfigurationChange = false;
}
}
......@@ -90,14 +100,17 @@ export abstract class BaseTextEditor extends BaseEditor {
if (!this.editorControl) {
return;
}
// Configuration & Options
if (configuration) {
// Update Editor with configuration and editor settings
let specificEditorSettings = this.getCodeEditorOptions();
const specificEditorSettings = this.getCodeEditorOptions();
configuration = objects.clone(configuration); // dont modify original config
objects.assign(configuration[EditorConfiguration.EDITOR_SECTION], specificEditorSettings);
EditorConfiguration.apply(configuration, this.editorControl);
}
} else {
// Just options
else {
this.editorControl.updateOptions(this.getCodeEditorOptions());
}
}
......@@ -107,22 +120,10 @@ export abstract class BaseTextEditor extends BaseEditor {
overviewRulerLanes: 3,
glyphMargin: true,
lineNumbersMinChars: 3,
theme: this._themeService.getColorTheme()
theme: this.themeService.getColorTheme()
};
}
public get eventService(): IEventService {
return this._eventService;
}
public get editorService() {
return this._editorService;
}
public get editorContainer(): Builder {
return this._editorContainer;
}
public createEditor(parent: Builder): void {
// Editor for Text
......
......@@ -32,7 +32,6 @@ import {IEventService} from 'vs/platform/event/common/event';
import {IInstantiationService} from 'vs/platform/instantiation/common/instantiation';
import {IMessageService, CancelAction} from 'vs/platform/message/common/message';
import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService';
import {IModeService} from 'vs/editor/common/services/modeService';
import {IThemeService} from 'vs/workbench/services/themes/common/themeService';
const TEXT_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'textEditorViewState';
......@@ -61,10 +60,9 @@ export class TextFileEditor extends BaseTextEditor {
@IConfigurationService configurationService: IConfigurationService,
@IEventService eventService: IEventService,
@IWorkbenchEditorService editorService: IWorkbenchEditorService,
@IModeService modeService: IModeService,
@IThemeService themeService: IThemeService
) {
super(TextFileEditor.ID, telemetryService, instantiationService, contextService, storageService, messageService, configurationService, eventService, editorService, modeService, themeService);
super(TextFileEditor.ID, telemetryService, instantiationService, contextService, storageService, messageService, configurationService, eventService, editorService, themeService);
// Since we are the one providing save-support for models, we hook up the error handler for saving
TextFileEditorModel.setSaveErrorHandler(instantiationService.createInstance(SaveErrorHandler));
......
......@@ -10,7 +10,6 @@ import {Action, IAction} from 'vs/base/common/actions';
import {Builder} from 'vs/base/browser/builder';
import {IActionItem} from 'vs/base/browser/ui/actionbar/actionbar';
import {IEditorOptions} from 'vs/editor/common/editorCommon';
import {IModeService} from 'vs/editor/common/services/modeService';
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
import {IStorageService} from 'vs/platform/storage/common/storage';
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
......@@ -40,12 +39,11 @@ export class OutputPanel extends StringEditor {
@IConfigurationService configurationService: IConfigurationService,
@IEventService eventService: IEventService,
@IWorkbenchEditorService editorService: IWorkbenchEditorService,
@IModeService modeService: IModeService,
@IThemeService themeService: IThemeService,
@IOutputService private outputService: IOutputService
) {
super(telemetryService, instantiationService, contextService, storageService,
messageService, configurationService, eventService, editorService, modeService, themeService);
messageService, configurationService, eventService, editorService, themeService);
this.toDispose = [];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册