提交 d96c1fb4 编写于 作者: I isidor

open editors: change configuration name

上级 266e686d
...@@ -38,6 +38,7 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { ...@@ -38,6 +38,7 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView {
private model: IEditorStacksModel; private model: IEditorStacksModel;
private dirtyCountElement: HTMLElement; private dirtyCountElement: HTMLElement;
private lastDirtyCount: number; private lastDirtyCount: number;
// Use a scheduler to update the tree as many update events come at some time so to prevent over-reacting.
private updateTreeScheduler: RunOnceScheduler; private updateTreeScheduler: RunOnceScheduler;
constructor(actionRunner: IActionRunner, settings: any, constructor(actionRunner: IActionRunner, settings: any,
...@@ -159,16 +160,14 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { ...@@ -159,16 +160,14 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView {
// } // }
private onConfigurationUpdated(configuration: IFilesConfiguration): void { private onConfigurationUpdated(configuration: IFilesConfiguration): void {
// TODO@isidor change configuration name let visibleOpenEditors = configuration && configuration.explorer && configuration.explorer.openEditors && configuration.explorer.openEditors.maxVisible;
let visibleOpenEditors = configuration && configuration.explorer && configuration.explorer.workingFiles && configuration.explorer.workingFiles.maxVisible;
if (typeof visibleOpenEditors === 'number') { if (typeof visibleOpenEditors === 'number') {
this.maxVisibleOpenEditors = visibleOpenEditors; this.maxVisibleOpenEditors = visibleOpenEditors;
} else { } else {
this.maxVisibleOpenEditors = OpenEditorsView.DEFAULT_MAX_VISIBLE_OPEN_EDITORS; this.maxVisibleOpenEditors = OpenEditorsView.DEFAULT_MAX_VISIBLE_OPEN_EDITORS;
} }
// TODO@isidor change configuration name let dynamicHeight = configuration && configuration.explorer && configuration.explorer.openEditors && configuration.explorer.openEditors.dynamicHeight;
let dynamicHeight = configuration && configuration.explorer && configuration.explorer.workingFiles && configuration.explorer.workingFiles.dynamicHeight;
if (typeof dynamicHeight === 'boolean') { if (typeof dynamicHeight === 'boolean') {
this.dynamicHeight = dynamicHeight; this.dynamicHeight = dynamicHeight;
} else { } else {
......
...@@ -103,19 +103,19 @@ export class WorkingFilesView extends AdaptiveCollapsibleViewletView { ...@@ -103,19 +103,19 @@ export class WorkingFilesView extends AdaptiveCollapsibleViewletView {
} }
private onConfigurationUpdated(configuration: IFilesConfiguration): void { private onConfigurationUpdated(configuration: IFilesConfiguration): void {
let visibleWorkingFiles = configuration && configuration.explorer && configuration.explorer.workingFiles && configuration.explorer.workingFiles.maxVisible; // let visibleWorkingFiles = configuration && configuration.explorer && configuration.explorer.workingFiles && configuration.explorer.workingFiles.maxVisible;
if (typeof visibleWorkingFiles === 'number') { // if (typeof visibleWorkingFiles === 'number') {
this.maxVisibleWorkingFiles = visibleWorkingFiles; // this.maxVisibleWorkingFiles = visibleWorkingFiles;
} else { // } else {
this.maxVisibleWorkingFiles = WorkingFilesView.DEFAULT_MAX_VISIBLE_FILES; // this.maxVisibleWorkingFiles = WorkingFilesView.DEFAULT_MAX_VISIBLE_FILES;
} // }
let dynamicHeight = configuration && configuration.explorer && configuration.explorer.workingFiles && configuration.explorer.workingFiles.dynamicHeight; // let dynamicHeight = configuration && configuration.explorer && configuration.explorer.workingFiles && configuration.explorer.workingFiles.dynamicHeight;
if (typeof dynamicHeight === 'boolean') { // if (typeof dynamicHeight === 'boolean') {
this.dynamicHeight = dynamicHeight; // this.dynamicHeight = dynamicHeight;
} else { // } else {
this.dynamicHeight = WorkingFilesView.DEFAULT_DYNAMIC_HEIGHT; // this.dynamicHeight = WorkingFilesView.DEFAULT_DYNAMIC_HEIGHT;
} // }
// Adjust expanded body size // Adjust expanded body size
this.expandedBodySize = this.getExpandedBodySize(this.model); this.expandedBodySize = this.getExpandedBodySize(this.model);
......
...@@ -63,7 +63,7 @@ export abstract class FileEditorInput extends EditorInput implements IFileEditor ...@@ -63,7 +63,7 @@ export abstract class FileEditorInput extends EditorInput implements IFileEditor
export interface IFilesConfiguration extends IFilesConfiguration { export interface IFilesConfiguration extends IFilesConfiguration {
explorer: { explorer: {
workingFiles: { openEditors: {
maxVisible: number; maxVisible: number;
dynamicHeight: boolean; dynamicHeight: boolean;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册