提交 8ff41920 编写于 作者: S Sandeep Somavarapu

Remove unused code #38414

上级 f33a8b7b
......@@ -151,15 +151,6 @@ export class ConfigurationModel implements IConfigurationModel {
}
}
public setValueInOverrides(overrideIdentifier: string, key: string, value: any): void {
let override = this.overrides.filter(override => override.identifiers.indexOf(overrideIdentifier) !== -1)[0];
if (!override) {
override = { identifiers: [overrideIdentifier], contents: {} };
this.overrides.push(override);
}
addToValueTree(override.contents, key, value, e => { throw new Error(e); });
}
private addKey(key: string): void {
let index = this.keys.length;
for (let i = 0; i < index; i++) {
......
......@@ -205,10 +205,6 @@ class ConfigurationRegistry implements IConfigurationRegistry {
return propertyKeys;
}
validateProperty(property: string): boolean {
return !OVERRIDE_PROPERTY_PATTERN.test(property) && this.getConfigurationProperties()[property] !== void 0;
}
getConfigurations(): IConfigurationNode[] {
return this.configurationContributors;
}
......
......@@ -102,44 +102,6 @@ suite('ConfigurationModel', () => {
assert.deepEqual(testObject.keys, []);
});
test('setValueInOverrides adds to overrides if does not exist', () => {
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a']);
testObject.setValueInOverrides('or', 'a', 2);
assert.deepEqual(testObject.overrides[0].contents, { 'a': 2 });
assert.deepEqual(testObject.override('or').contents, { 'a': 2, 'b': 1 });
});
test('setValueInOverrides adds to overrides if exist', () => {
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a'], [{ identifiers: ['or'], contents: { 'a': 2 } }]);
testObject.setValueInOverrides('or', 'a', 3);
assert.deepEqual(testObject.overrides[0].contents, { 'a': 3 });
assert.deepEqual(testObject.override('or').contents, { 'a': 3, 'b': 1 });
});
test('setValueInOverrides adds a nested key to overrides if exist', () => {
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a'], [{ identifiers: ['or'], contents: { 'a': { 'c': 1 } } }]);
testObject.setValueInOverrides('or', 'a.c', 2);
assert.deepEqual(testObject.overrides[0].contents, { 'a': { 'c': 2 } });
assert.deepEqual(testObject.override('or').contents, { 'a': { 'c': 2 }, 'b': 1 });
});
test('setValueInOverrides adds new overrides if exist', () => {
let testObject = new ConfigurationModel({ 'a': 1, 'b': 1 }, ['a'], [{ identifiers: ['or1'], contents: { 'a': 2 } }]);
testObject.setValueInOverrides('or2', 'b', 2);
assert.deepEqual(testObject.overrides[0].contents, { 'a': 2 });
assert.deepEqual(testObject.overrides[1].contents, { 'b': 2 });
assert.deepEqual(testObject.override('or1').contents, { 'a': 2, 'b': 1 });
assert.deepEqual(testObject.override('or2').contents, { 'a': 1, 'b': 2 });
});
test('get overriding configuration model for an existing identifier', () => {
let testObject = new ConfigurationModel(
{ 'a': { 'b': 1 }, 'f': 1 }, [],
......
......@@ -13,7 +13,6 @@ export class ViewLocation {
static readonly Explorer = new ViewLocation('explorer');
static readonly Debug = new ViewLocation('debug');
static readonly Extensions = new ViewLocation('extensions');
static readonly SCM = new ViewLocation('scm');
constructor(private _id: string) {
}
......@@ -75,7 +74,7 @@ export interface IViewsRegistry {
}
export const ViewsRegistry: IViewsRegistry = new class {
export const ViewsRegistry: IViewsRegistry = new class implements IViewsRegistry {
private _onViewsRegistered: Emitter<IViewDescriptor[]> = new Emitter<IViewDescriptor[]>();
readonly onViewsRegistered: Event<IViewDescriptor[]> = this._onViewsRegistered.event;
......
......@@ -35,10 +35,6 @@ export interface IViewOptions extends IPanelOptions {
actionRunner: IActionRunner;
}
export interface IViewConstructorSignature<T extends ViewsViewletPanel> {
new(options: IViewOptions, ...services: { _serviceBrand: any; }[]): T;
}
export abstract class ViewsViewletPanel extends ViewletPanel {
readonly id: string;
......@@ -457,10 +453,6 @@ export class ViewsViewlet extends PanelViewlet {
}
}
protected getDefaultViewSize(): number | undefined {
return undefined;
}
private isCurrentlyVisible(viewDescriptor: IViewDescriptor): boolean {
return !!this.getView(viewDescriptor.id);
}
......
......@@ -298,11 +298,6 @@ export class MarkersModel {
this._nonFilteredResources = [];
}
public getTitle(markerStatistics: MarkerStatistics): string {
let title = MarkersModel.getStatisticsLabel(markerStatistics);
return title ? title : Messages.MARKERS_PANEL_TITLE_PROBLEMS;
}
public getMessage(): string {
if (this.hasFilteredResources()) {
return '';
......@@ -360,10 +355,4 @@ export class MarkersModel {
}
return a.marker.severity > b.marker.severity ? -1 : 1;
}
}
export interface IProblemsConfiguration {
problems: {
autoReveal: boolean
};
}
\ No newline at end of file
......@@ -13,7 +13,6 @@ export default class Messages {
public static MARKERS_PANEL_VIEW_CATEGORY: string = nls.localize('viewCategory', "View");
public static MARKERS_PANEL_TOGGLE_LABEL: string = nls.localize('problems.view.toggle.label', "Toggle Problems");
public static MARKERS_PANEL_SHOW_LABEL: string = nls.localize('problems.view.focus.label', "Focus Problems");
public static MARKERS_PANEL_HIDE_LABEL: string = nls.localize('problems.view.hide.label', "Hide Problems");
public static PROBLEMS_PANEL_CONFIGURATION_TITLE: string = nls.localize('problems.panel.configuration.title', "Problems View");
public static PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL: string = nls.localize('problems.panel.configuration.autoreveal', "Controls if Problems view should automatically reveal files when opening them");
......
......@@ -858,7 +858,7 @@ interface ISettingsEditorContribution extends editorCommon.IEditorContribution {
}
abstract class AbstractSettingsEditorContribution extends Disposable {
abstract class AbstractSettingsEditorContribution extends Disposable implements ISettingsEditorContribution {
private preferencesRendererCreationPromise: TPromise<IPreferencesRenderer<ISetting>>;
......@@ -934,6 +934,7 @@ abstract class AbstractSettingsEditorContribution extends Disposable {
}
protected abstract _createPreferencesRenderer(): TPromise<IPreferencesRenderer<ISetting>>;
abstract getId(): string;
}
class DefaultSettingsEditorContribution extends AbstractSettingsEditorContribution implements ISettingsEditorContribution {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册