From 7e2d9ee7b32b66e2192bddbc56f79ecad460bc3f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 10 Oct 2017 13:05:04 +0200 Subject: [PATCH] have markerFileDecorations in one place --- .../markers/browser/markersFileDecorations.ts | 18 ++++++++++++++++-- .../browser/markersWorkbenchContributions.ts | 17 ----------------- .../parts/markers/markers.contribution.ts | 4 +++- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/parts/markers/browser/markersFileDecorations.ts b/src/vs/workbench/parts/markers/browser/markersFileDecorations.ts index ab126fb6764..4f36dfed113 100644 --- a/src/vs/workbench/parts/markers/browser/markersFileDecorations.ts +++ b/src/vs/workbench/parts/markers/browser/markersFileDecorations.ts @@ -5,7 +5,7 @@ 'use strict'; -import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions } from 'vs/workbench/common/contributions'; +import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IResourceDecorationsService, IDecorationsProvider, IResourceDecoration } from 'vs/workbench/services/decorations/browser/decorations'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -17,6 +17,7 @@ import { Registry } from 'vs/platform/registry/common/platform'; import Severity from 'vs/base/common/severity'; import { editorErrorForeground, editorWarningForeground } from 'vs/editor/common/view/editorColorRegistry'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; class MarkersDecorationsProvider implements IDecorationsProvider { @@ -89,4 +90,17 @@ class MarkersFileDecorations implements IWorkbenchContribution { } } -Registry.as(Extensions.Workbench).registerWorkbenchContribution(MarkersFileDecorations); +Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(MarkersFileDecorations); + +Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ + 'id': 'problems', + 'order': 101, + 'type': 'object', + 'properties': { + 'problems.fileDecorations.enabled': { + 'description': localize('markers.showOnFile', "Show Errors & Warnings on files and folder."), + 'type': 'boolean', + 'default': true + } + } +}); diff --git a/src/vs/workbench/parts/markers/browser/markersWorkbenchContributions.ts b/src/vs/workbench/parts/markers/browser/markersWorkbenchContributions.ts index b3dbb714669..39970c806b9 100644 --- a/src/vs/workbench/parts/markers/browser/markersWorkbenchContributions.ts +++ b/src/vs/workbench/parts/markers/browser/markersWorkbenchContributions.ts @@ -17,9 +17,6 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { MarkersPanel } from 'vs/workbench/parts/markers/browser/markersPanel'; -import './markersFileDecorations'; -import { localize } from 'vs/nls'; - export function registerContributions(): void { KeybindingsRegistry.registerCommandAndKeybindingRule({ @@ -51,20 +48,6 @@ export function registerContributions(): void { } }); - Registry.as(Extensions.Configuration).registerConfiguration({ - 'id': 'problems', - 'order': 101, - 'type': 'object', - 'properties': { - 'problems.fileDecorations.enabled': { - 'description': localize('markers.showOnFile', "Show Errors & Warnings on files and folder."), - 'type': 'boolean', - 'default': true - } - } - }); - - // markers panel Registry.as(PanelExtensions.Panels).registerPanel(new PanelDescriptor( diff --git a/src/vs/workbench/parts/markers/markers.contribution.ts b/src/vs/workbench/parts/markers/markers.contribution.ts index 8e93a5abe41..b7b91dbc852 100644 --- a/src/vs/workbench/parts/markers/markers.contribution.ts +++ b/src/vs/workbench/parts/markers/markers.contribution.ts @@ -5,5 +5,7 @@ import { registerContributions } from 'vs/workbench/parts/markers/browser/markersWorkbenchContributions'; import { registerContributions as registerElectronContributions } from 'vs/workbench/parts/markers/electron-browser/markersElectronContributions'; +import './browser/markersFileDecorations'; + registerContributions(); -registerElectronContributions(); \ No newline at end of file +registerElectronContributions();