@theia/markers 1.25.0-next.4 → 1.25.0-next.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ import URI from '@theia/core/lib/common/uri';
2
+ import { Decoration, DecorationsProvider, DecorationsService } from '@theia/core/lib/browser/decorations-service';
3
+ import { ProblemManager } from './problem-manager';
4
+ import { FrontendApplicationContribution } from '@theia/core/lib/browser';
5
+ import { CancellationToken, Emitter, Event } from '@theia/core';
6
+ export declare class ProblemDecorationsProvider implements DecorationsProvider {
7
+ protected readonly problemManager: ProblemManager;
8
+ protected currentUris: URI[];
9
+ protected readonly onDidChangeEmitter: Emitter<URI[]>;
10
+ get onDidChange(): Event<URI[]>;
11
+ protected init(): void;
12
+ provideDecorations(uri: URI, token: CancellationToken): Decoration | Promise<Decoration | undefined> | undefined;
13
+ }
14
+ export declare class ProblemDecorationContribution implements FrontendApplicationContribution {
15
+ protected readonly decorationsService: DecorationsService;
16
+ protected readonly problemDecorationProvider: ProblemDecorationsProvider;
17
+ initialize(): void;
18
+ }
19
+ //# sourceMappingURL=problem-decorations-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-decorations-provider.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-decorations-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAO,MAAM,aAAa,CAAC;AAErE,qBACa,0BAA2B,YAAW,mBAAmB;IAC1C,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAE1E,SAAS,CAAC,WAAW,EAAE,GAAG,EAAE,CAAM;IAElC,SAAS,CAAC,QAAQ,CAAC,kBAAkB,iBAAwB;IAC7D,IAAI,WAAW,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC,CAE9B;IAGD,SAAS,CAAC,IAAI,IAAI,IAAI;IAQtB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,SAAS;CAYnH;AAED,qBACa,6BAA8B,YAAW,+BAA+B;IACrD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAClD,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,0BAA0B,CAAC;IAE7G,UAAU,IAAI,IAAI;CAGrB"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2022 Ericsson and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.ProblemDecorationContribution = exports.ProblemDecorationsProvider = void 0;
28
+ const inversify_1 = require("@theia/core/shared/inversify");
29
+ const uri_1 = require("@theia/core/lib/common/uri");
30
+ const decorations_service_1 = require("@theia/core/lib/browser/decorations-service");
31
+ const problem_manager_1 = require("./problem-manager");
32
+ const problem_utils_1 = require("./problem-utils");
33
+ const core_1 = require("@theia/core");
34
+ let ProblemDecorationsProvider = class ProblemDecorationsProvider {
35
+ constructor() {
36
+ this.currentUris = [];
37
+ this.onDidChangeEmitter = new core_1.Emitter();
38
+ }
39
+ get onDidChange() {
40
+ return this.onDidChangeEmitter.event;
41
+ }
42
+ init() {
43
+ this.problemManager.onDidChangeMarkers(() => {
44
+ const newUris = Array.from(this.problemManager.getUris(), stringified => new uri_1.default(stringified));
45
+ this.onDidChangeEmitter.fire(newUris.concat(this.currentUris));
46
+ this.currentUris = newUris;
47
+ });
48
+ }
49
+ provideDecorations(uri, token) {
50
+ const markers = this.problemManager.findMarkers({ uri }).filter(problem_utils_1.ProblemUtils.filterMarker).sort(problem_utils_1.ProblemUtils.severityCompareMarker);
51
+ if (markers.length) {
52
+ return {
53
+ bubble: true,
54
+ letter: markers.length.toString(),
55
+ weight: problem_utils_1.ProblemUtils.getPriority(markers[0]),
56
+ colorId: problem_utils_1.ProblemUtils.getColor(markers[0]),
57
+ tooltip: markers.length === 1 ? core_1.nls.localizeByDefault('1 problem in this file') : core_1.nls.localizeByDefault('{0} problems in this file', markers.length),
58
+ };
59
+ }
60
+ }
61
+ };
62
+ __decorate([
63
+ (0, inversify_1.inject)(problem_manager_1.ProblemManager),
64
+ __metadata("design:type", problem_manager_1.ProblemManager)
65
+ ], ProblemDecorationsProvider.prototype, "problemManager", void 0);
66
+ __decorate([
67
+ (0, inversify_1.postConstruct)(),
68
+ __metadata("design:type", Function),
69
+ __metadata("design:paramtypes", []),
70
+ __metadata("design:returntype", void 0)
71
+ ], ProblemDecorationsProvider.prototype, "init", null);
72
+ ProblemDecorationsProvider = __decorate([
73
+ (0, inversify_1.injectable)()
74
+ ], ProblemDecorationsProvider);
75
+ exports.ProblemDecorationsProvider = ProblemDecorationsProvider;
76
+ let ProblemDecorationContribution = class ProblemDecorationContribution {
77
+ initialize() {
78
+ this.decorationsService.registerDecorationsProvider(this.problemDecorationProvider);
79
+ }
80
+ };
81
+ __decorate([
82
+ (0, inversify_1.inject)(decorations_service_1.DecorationsService),
83
+ __metadata("design:type", Object)
84
+ ], ProblemDecorationContribution.prototype, "decorationsService", void 0);
85
+ __decorate([
86
+ (0, inversify_1.inject)(ProblemDecorationsProvider),
87
+ __metadata("design:type", ProblemDecorationsProvider)
88
+ ], ProblemDecorationContribution.prototype, "problemDecorationProvider", void 0);
89
+ ProblemDecorationContribution = __decorate([
90
+ (0, inversify_1.injectable)()
91
+ ], ProblemDecorationContribution);
92
+ exports.ProblemDecorationContribution = ProblemDecorationContribution;
93
+ //# sourceMappingURL=problem-decorations-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem-decorations-provider.js","sourceRoot":"","sources":["../../../src/browser/problem/problem-decorations-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;;;;;;;AAEhF,4DAAiF;AACjF,oDAA6C;AAC7C,qFAAkH;AAClH,uDAAmD;AACnD,mDAA+C;AAE/C,sCAAqE;AAGrE,IAAa,0BAA0B,GAAvC,MAAa,0BAA0B;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B,CAAC,2BAA2B,EAAE,OAAO,CAAC,MAAM,CAAC;aACvJ,CAAC;SACL;IACL,CAAC;CACJ,CAAA;AA9B2B;IAAvB,IAAA,kBAAM,EAAC,gCAAc,CAAC;8BAAoC,gCAAc;kEAAC;AAU1E;IADC,IAAA,yBAAa,GAAE;;;;sDAOf;AAjBQ,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CA+BtC;AA/BY,gEAA0B;AAkCvC,IAAa,6BAA6B,GAA1C,MAAa,6BAA6B;IAItC,UAAU;QACN,IAAI,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IACxF,CAAC;CACJ,CAAA;AAN+B;IAA3B,IAAA,kBAAM,EAAC,wCAAkB,CAAC;;yEAA2D;AAClD;IAAnC,IAAA,kBAAM,EAAC,0BAA0B,CAAC;8BAA+C,0BAA0B;gFAAC;AAFpG,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAOzC;AAPY,sEAA6B"}
@@ -8,6 +8,10 @@ import { ProblemManager } from './problem-manager';
8
8
  import { ProblemPreferences } from './problem-preferences';
9
9
  import { LabelProvider } from '@theia/core/lib/browser';
10
10
  import { WorkspaceService } from '@theia/workspace/lib/browser';
11
+ /**
12
+ * @deprecated since 1.25.0
13
+ * URI-based decorators should implement `DecorationsProvider` and contribute decorations via the `DecorationsService`.
14
+ */
11
15
  export declare class ProblemDecorator implements TreeDecorator {
12
16
  protected readonly problemManager: ProblemManager;
13
17
  protected problemPreferences: ProblemPreferences;
@@ -21,7 +25,6 @@ export declare class ProblemDecorator implements TreeDecorator {
21
25
  get onDidChangeDecorations(): Event<(tree: Tree) => Map<string, TreeDecoration.Data>>;
22
26
  protected fireDidChangeDecorations(event: (tree: Tree) => Map<string, TreeDecoration.Data>): void;
23
27
  protected collectDecorators(tree: Tree): Map<string, TreeDecoration.Data>;
24
- protected appendSuffixDecoration(nodeURI: URI, existingDecorations?: TreeDecoration.Data): TreeDecoration.Data;
25
28
  protected generateCaptionSuffix(nodeURI: URI): string;
26
29
  /**
27
30
  * Traverses up the tree from the given node and attaches decorations to any parents.
@@ -1 +1 @@
1
- {"version":3,"file":"problem-decorator.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-decorator.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,UAAU,EAAsB,MAAM,mDAAmD,CAAC;AACnG,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,qBACa,gBAAiB,YAAW,aAAa;IAWd,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc;IARrF,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACvB,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACzD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEvE,QAAQ,CAAC,EAAE,6BAA6B;IAExC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;gBAE/B,cAAc,EAAE,cAAc;IAMrF,SAAS,CAAC,IAAI,IAAI,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IAatE,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,GAAG,cAAc,CAAC,IAAI;IAezE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,KAAK;IASpE;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM;IAUzD;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,OAAO;IAO3D,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS;IAI5D,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM;IAI9E,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,IAAI,GAAG,MAAM;CAG7F;AAED,yBAAiB,gBAAgB,CAAC;IAGvB,MAAM,eAAe,0DAAqC,CAAC;CAErE"}
@@ -38,9 +38,12 @@ const browser_1 = require("@theia/filesystem/lib/browser");
38
38
  const problem_manager_1 = require("./problem-manager");
39
39
  const problem_preferences_1 = require("./problem-preferences");
40
40
  const problem_utils_1 = require("./problem-utils");
41
- const navigator_open_editors_tree_model_1 = require("@theia/navigator/lib/browser/open-editors-widget/navigator-open-editors-tree-model");
42
41
  const browser_2 = require("@theia/core/lib/browser");
43
42
  const browser_3 = require("@theia/workspace/lib/browser");
43
+ /**
44
+ * @deprecated since 1.25.0
45
+ * URI-based decorators should implement `DecorationsProvider` and contribute decorations via the `DecorationsService`.
46
+ */
44
47
  let ProblemDecorator = ProblemDecorator_1 = class ProblemDecorator {
45
48
  constructor(problemManager) {
46
49
  this.problemManager = problemManager;
@@ -80,11 +83,8 @@ let ProblemDecorator = ProblemDecorator_1 = class ProblemDecorator {
80
83
  for (const node of new tree_iterator_1.DepthFirstTreeIterator(tree.root)) {
81
84
  const nodeUri = this.getUriFromNode(node);
82
85
  if (nodeUri) {
83
- let decorator = baseDecorations.get(nodeUri);
84
- if (navigator_open_editors_tree_model_1.OpenEditorNode.is(node)) {
85
- decorator = this.appendSuffixDecoration(node.uri, decorator);
86
- }
87
- else if (decorator) {
86
+ const decorator = baseDecorations.get(nodeUri);
87
+ if (decorator) {
88
88
  this.appendContainerMarkers(node, decorator, decorations);
89
89
  }
90
90
  if (decorator) {
@@ -94,20 +94,6 @@ let ProblemDecorator = ProblemDecorator_1 = class ProblemDecorator {
94
94
  }
95
95
  return decorations;
96
96
  }
97
- appendSuffixDecoration(nodeURI, existingDecorations) {
98
- var _a;
99
- const workspaceAndPath = this.generateCaptionSuffix(nodeURI);
100
- const color = (_a = existingDecorations === null || existingDecorations === void 0 ? void 0 : existingDecorations.fontData) === null || _a === void 0 ? void 0 : _a.color;
101
- const captionSuffix = { data: workspaceAndPath };
102
- if (color) {
103
- Object.assign(captionSuffix, { fontData: { color } });
104
- }
105
- const suffixDecorations = {
106
- captionSuffixes: [captionSuffix]
107
- };
108
- const decorator = existingDecorations !== null && existingDecorations !== void 0 ? existingDecorations : {};
109
- return Object.assign(decorator, suffixDecorations);
110
- }
111
97
  generateCaptionSuffix(nodeURI) {
112
98
  var _a;
113
99
  const workspaceRoots = this.workspaceService.tryGetRoots();
@@ -1 +1 @@
1
- {"version":3,"file":"problem-decorator.js","sourceRoot":"","sources":["../../../src/browser/problem/problem-decorator.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;;;;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ACrC,CAAC;IAES,OAAO,CAAC,IAAwB,EAAE,KAAyB;QACjE,OAAO,kBAAgB,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC;IAES,iBAAiB,CAAC,IAAyB,EAAE,KAA0B;QAC7E,OAAO,+BAAc,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;CACJ,CAAA;AA/KG;IADC,IAAA,kBAAM,EAAC,wCAAkB,CAAC;;4DACsB;AACvB;IAAzB,IAAA,kBAAM,EAAC,0BAAgB,CAAC;8BAAsC,0BAAgB;0DAAC;AACzD;IAAtB,IAAA,kBAAM,EAAC,uBAAa,CAAC;8BAAmC,uBAAa;uDAAC;AAYvE;IADC,IAAA,yBAAa,GAAE;;;;4CAaf;AA7BQ,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;IAYI,WAAA,IAAA,kBAAM,EAAC,gCAAc,CAAC,CAAA;qCAAoC,gCAAc;GAX5E,gBAAgB,CAkL5B;AAlLY,4CAAgB;AAoL7B,WAAiB,gBAAgB;IAE7B,0GAA0G;IAC7F,gCAAe,GAAG,4BAAY,CAAC,qBAAqB,CAAC;AAEtE,CAAC,EALgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAKhC;AAzLY,4CAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"problem-frontend-module.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,sCAAsC,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAkB/D,wBA6BG"}
1
+ {"version":3,"file":"problem-frontend-module.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,sCAAsC,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAgB/D,wBA6BG"}
@@ -23,8 +23,6 @@ const problem_container_1 = require("./problem-container");
23
23
  const browser_1 = require("@theia/core/lib/browser");
24
24
  const problem_manager_1 = require("./problem-manager");
25
25
  const widget_manager_1 = require("@theia/core/lib/browser/widget-manager");
26
- const navigator_decorator_service_1 = require("@theia/navigator/lib/browser/navigator-decorator-service");
27
- const problem_decorator_1 = require("./problem-decorator");
28
26
  const problem_tabbar_decorator_1 = require("./problem-tabbar-decorator");
29
27
  const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
30
28
  const problem_layout_migrations_1 = require("./problem-layout-migrations");
@@ -32,7 +30,7 @@ const tab_bar_decorator_1 = require("@theia/core/lib/browser/shell/tab-bar-decor
32
30
  const problem_preferences_1 = require("./problem-preferences");
33
31
  const marker_tree_label_provider_1 = require("../marker-tree-label-provider");
34
32
  const problem_widget_tab_bar_decorator_1 = require("./problem-widget-tab-bar-decorator");
35
- const navigator_open_editors_decorator_service_1 = require("@theia/navigator/lib/browser/open-editors-widget/navigator-open-editors-decorator-service");
33
+ const problem_decorations_provider_1 = require("./problem-decorations-provider");
36
34
  exports.default = new inversify_1.ContainerModule(bind => {
37
35
  (0, problem_preferences_1.bindProblemPreferences)(bind);
38
36
  bind(problem_manager_1.ProblemManager).toSelf().inSingletonScope();
@@ -45,11 +43,11 @@ exports.default = new inversify_1.ContainerModule(bind => {
45
43
  (0, browser_1.bindViewContribution)(bind, problem_contribution_1.ProblemContribution);
46
44
  bind(browser_1.FrontendApplicationContribution).toService(problem_contribution_1.ProblemContribution);
47
45
  bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(problem_contribution_1.ProblemContribution);
48
- bind(problem_decorator_1.ProblemDecorator).toSelf().inSingletonScope();
49
- bind(navigator_decorator_service_1.NavigatorTreeDecorator).toService(problem_decorator_1.ProblemDecorator);
50
- bind(navigator_open_editors_decorator_service_1.OpenEditorsTreeDecorator).toService(problem_decorator_1.ProblemDecorator);
46
+ bind(problem_decorations_provider_1.ProblemDecorationsProvider).toSelf().inSingletonScope();
51
47
  bind(problem_tabbar_decorator_1.ProblemTabBarDecorator).toSelf().inSingletonScope();
52
48
  bind(tab_bar_decorator_1.TabBarDecorator).toService(problem_tabbar_decorator_1.ProblemTabBarDecorator);
49
+ bind(problem_decorations_provider_1.ProblemDecorationContribution).toSelf().inSingletonScope();
50
+ bind(browser_1.FrontendApplicationContribution).toService(problem_decorations_provider_1.ProblemDecorationContribution);
53
51
  bind(marker_tree_label_provider_1.MarkerTreeLabelProvider).toSelf().inSingletonScope();
54
52
  bind(browser_1.LabelProviderContribution).toService(marker_tree_label_provider_1.MarkerTreeLabelProvider);
55
53
  bind(problem_widget_tab_bar_decorator_1.ProblemWidgetTabBarDecorator).toSelf().inSingletonScope();
@@ -1 +1 @@
1
- {"version":3,"file":"problem-frontend-module.js","sourceRoot":"","sources":["../../../src/browser/problem/problem-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;AAEhF,gDAA8C;AAE9C,4DAA+D;AAC/D,qDAAqE;AACrE,iEAA6D;AAC7D,2DAA0D;AAC1D,qDAA4J;AAC5J,uDAAmD;AACnD,2EAAuE;AACvE,0GAAkG;AAClG,2DAAuD;AACvD,yEAAoE;AACpE,mFAA0F;AAC1F,2EAA6E;AAC7E,uFAAkF;AAClF,+DAA+D;AAC/D,8EAAwE;AACxE,yFAAkF;AAClF,wJAAqI;AAErI,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAA,4CAAsB,EAAC,IAAI,CAAC,CAAC;IAE7B,IAAI,CAAC,gCAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEjD,IAAI,C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AAI,CAAC,mCAAe,CAAC,CAAC,SAAS,CAAC,+DAA4B,CAAC,CAAC;AAClE,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"problem-frontend-module.js","sourceRoot":"","sources":["../../../src/browser/problem/problem-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;AAEhF,gDAA8C;AAE9C,4DAA+D;AAC/D,qDAAqE;AACrE,iEAA6D;AAC7D,2DAA0D;AAC1D,qDAA4J;AAC5J,uDAAmD;AACnD,2EAAuE;AACvE,yEAAoE;AACpE,mFAA0F;AAC1F,2EAA6E;AAC7E,uFAAkF;AAClF,+DAA+D;AAC/D,8EAAwE;AACxE,yFAAkF;AAClF,iFAA2G;AAE3G,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAA,4CAAsB,EAAC,IAAI,CAAC,CAAC;IAE7B,IAAI,CAAC,gCAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEjD,IAAI,CAAC,8BAAa,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACrC,IAAA,uCAAmB,EAAC,GAAG,CAAC,SAAS,CAAC,CACrC,CAAC;IACF,IAAI,CAAC,8BAAa,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3C,EAAE,EAAE,mCAAkB;QACtB,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAgB,8BAAa,CAAC;KAC1E,CAAC,CAAC,CAAC;IACJ,IAAI,CAAC,yCAA+B,CAAC,CAAC,EAAE,CAAC,0DAA8B,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAE5F,IAAA,8BAAoB,EAAC,IAAI,EAAE,0CAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,0CAAmB,CAAC,CAAC;IACrE,IAAI,CAAC,2CAAyB,CAAC,CAAC,SAAS,CAAC,0CAAmB,CAAC,CAAC;IAE/D,IAAI,CAAC,yDAA0B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC7D,IAAI,CAAC,iDAAsB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACzD,IAAI,CAAC,mCAAe,CAAC,CAAC,SAAS,CAAC,iDAAsB,CAAC,CAAC;IACxD,IAAI,CAAC,4DAA6B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAChE,IAAI,CAAC,yCAA+B,CAAC,CAAC,SAAS,CAAC,4DAA6B,CAAC,CAAC;IAE/E,IAAI,CAAC,oDAAuB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC1D,IAAI,CAAC,mCAAyB,CAAC,CAAC,SAAS,CAAC,oDAAuB,CAAC,CAAC;IAEnE,IAAI,CAAC,+DAA4B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC/D,IAAI,CAAC,mCAAe,CAAC,CAAC,SAAS,CAAC,+DAA4B,CAAC,CAAC;AAClE,CAAC,CAAC,CAAC"}
@@ -38,5 +38,8 @@ export declare namespace ProblemUtils {
38
38
  * @param b the second marker for comparison.
39
39
  */
40
40
  const ownerCompare: (a: Marker<Diagnostic>, b: Marker<Diagnostic>) => number;
41
+ function getPriority(marker: Marker<Diagnostic>): number;
42
+ function getColor(marker: Marker<Diagnostic>): string;
43
+ function filterMarker(marker: Marker<Diagnostic>): boolean;
41
44
  }
42
45
  //# sourceMappingURL=problem-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"problem-utils.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-utils.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEnG,yBAAiB,YAAY,CAAC;IAE1B;;;;;;OAMG;IACI,MAAM,qBAAqB,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MACU,CAAC;IAEhG;;;;;;OAMG;IACI,MAAM,eAAe,MAAO,kBAAkB,GAAG,SAAS,KAAK,kBAAkB,GAAG,SAAS,KAAG,MACpC,CAAC;IAEpE;;;;;OAKG;IACI,MAAM,iBAAiB,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MAA2D,CAAC;IAE7I;;;;;OAKG;IACI,MAAM,mBAAmB,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MAAqE,CAAC;IAEzJ;;;;;OAKG;IACI,MAAM,YAAY,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MAAwC,CAAC;CAExH"}
1
+ {"version":3,"file":"problem-utils.d.ts","sourceRoot":"","sources":["../../../src/browser/problem/problem-utils.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEnG,yBAAiB,YAAY,CAAC;IAE1B;;;;;;OAMG;IACI,MAAM,qBAAqB,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MACU,CAAC;IAEhG;;;;;;OAMG;IACI,MAAM,eAAe,MAAO,kBAAkB,GAAG,SAAS,KAAK,kBAAkB,GAAG,SAAS,KAAG,MACpC,CAAC;IAEpE;;;;;OAKG;IACI,MAAM,iBAAiB,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MAA2D,CAAC;IAE7I;;;;;OAKG;IACI,MAAM,mBAAmB,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MAAqE,CAAC;IAEzJ;;;;;OAKG;IACI,MAAM,YAAY,MAAO,OAAO,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,KAAG,MAAwC,CAAC;IAErH,SAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAQ9D;IAED,SAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAO3D;IAED,SAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,OAAO,CAKhE;CACJ"}
@@ -16,6 +16,7 @@
16
16
  // *****************************************************************************
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.ProblemUtils = void 0;
19
+ const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
19
20
  var ProblemUtils;
20
21
  (function (ProblemUtils) {
21
22
  /**
@@ -55,5 +56,31 @@ var ProblemUtils;
55
56
  * @param b the second marker for comparison.
56
57
  */
57
58
  ProblemUtils.ownerCompare = (a, b) => a.owner.localeCompare(b.owner);
59
+ function getPriority(marker) {
60
+ const { severity } = marker.data;
61
+ switch (severity) {
62
+ case vscode_languageserver_protocol_1.DiagnosticSeverity.Error: return 30;
63
+ case vscode_languageserver_protocol_1.DiagnosticSeverity.Warning: return 20;
64
+ case vscode_languageserver_protocol_1.DiagnosticSeverity.Information: return 10;
65
+ default: return 0;
66
+ }
67
+ }
68
+ ProblemUtils.getPriority = getPriority;
69
+ function getColor(marker) {
70
+ const { severity } = marker.data;
71
+ switch (severity) {
72
+ case vscode_languageserver_protocol_1.DiagnosticSeverity.Error: return 'list.errorForeground';
73
+ case vscode_languageserver_protocol_1.DiagnosticSeverity.Warning: return 'list.warningForeground';
74
+ default: return 'successBackground';
75
+ }
76
+ }
77
+ ProblemUtils.getColor = getColor;
78
+ function filterMarker(marker) {
79
+ const { severity } = marker.data;
80
+ return severity === vscode_languageserver_protocol_1.DiagnosticSeverity.Error
81
+ || severity === vscode_languageserver_protocol_1.DiagnosticSeverity.Warning
82
+ || severity === vscode_languageserver_protocol_1.DiagnosticSeverity.Information;
83
+ }
84
+ ProblemUtils.filterMarker = filterMarker;
58
85
  })(ProblemUtils = exports.ProblemUtils || (exports.ProblemUtils = {}));
59
86
  //# sourceMappingURL=problem-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"problem-utils.js","sourceRoot":"","sources":["../../../src/browser/problem/problem-utils.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAKhF,IAAiB,YAAY,CA8C5B;AA9CD,WAAiB,YAAY;IAEzB;;;;;;OAMG;IACU,kCAAqB,GAAG,CAAC,CAAqB,EAAE,CAAqB,EAAU,EAAE,CAC1F,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEhG;;;;;;OAMG;IACU,4BAAe,GAAG,CAAC,CAAiC,EAAE,CAAiC,EAAU,EAAE,CAC5G,CAAC,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEpE;;;;;OAKG;IACU,8BAAiB,GAAG,CAAC,CAAqB,EAAE,CAAqB,EAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,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,CAAC,OAAO,wBAAwB,CAAC;YACjE,OAAO,CAAC,CAAC,OAAO,mBAAmB,CAAC;SACvC;IACL,CAAC;IAPe,qBAAQ,WAOvB,CAAA;IAED,SAAgB,YAAY,CAAC,MAA0B;QACnD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;QACjC,OAAO,QAAQ,KAAK,mDAAkB,CAAC,KAAK;eACrC,QAAQ,KAAK,mDAAkB,CAAC,OAAO;eACvC,QAAQ,KAAK,mDAAkB,CAAC,WAAW,CAAC;IACvD,CAAC;IALe,yBAAY,eAK3B,CAAA;AACL,CAAC,EAvEgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAuE5B"}
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "@theia/markers",
3
- "version": "1.25.0-next.4+1c7bdf70025",
3
+ "version": "1.25.0-next.40+cbc30a32b74",
4
4
  "description": "Theia - Markers Extension",
5
5
  "dependencies": {
6
- "@theia/core": "1.25.0-next.4+1c7bdf70025",
7
- "@theia/filesystem": "1.25.0-next.4+1c7bdf70025",
8
- "@theia/navigator": "1.25.0-next.4+1c7bdf70025",
9
- "@theia/workspace": "1.25.0-next.4+1c7bdf70025"
6
+ "@theia/core": "1.25.0-next.40+cbc30a32b74",
7
+ "@theia/filesystem": "1.25.0-next.40+cbc30a32b74",
8
+ "@theia/workspace": "1.25.0-next.40+cbc30a32b74"
10
9
  },
11
10
  "publishConfig": {
12
11
  "access": "public"
@@ -46,5 +45,5 @@
46
45
  "nyc": {
47
46
  "extends": "../../configs/nyc.json"
48
47
  },
49
- "gitHead": "1c7bdf70025c684e7ca22c482e206cceb405ddbd"
48
+ "gitHead": "cbc30a32b74e4de6d73725774e6ec122d14dc579"
50
49
  }
@@ -0,0 +1,67 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2022 Ericsson and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
18
+ import URI from '@theia/core/lib/common/uri';
19
+ import { Decoration, DecorationsProvider, DecorationsService } from '@theia/core/lib/browser/decorations-service';
20
+ import { ProblemManager } from './problem-manager';
21
+ import { ProblemUtils } from './problem-utils';
22
+ import { FrontendApplicationContribution } from '@theia/core/lib/browser';
23
+ import { CancellationToken, Emitter, Event, nls } from '@theia/core';
24
+
25
+ @injectable()
26
+ export class ProblemDecorationsProvider implements DecorationsProvider {
27
+ @inject(ProblemManager) protected readonly problemManager: ProblemManager;
28
+
29
+ protected currentUris: URI[] = [];
30
+
31
+ protected readonly onDidChangeEmitter = new Emitter<URI[]>();
32
+ get onDidChange(): Event<URI[]> {
33
+ return this.onDidChangeEmitter.event;
34
+ }
35
+
36
+ @postConstruct()
37
+ protected init(): void {
38
+ this.problemManager.onDidChangeMarkers(() => {
39
+ const newUris = Array.from(this.problemManager.getUris(), stringified => new URI(stringified));
40
+ this.onDidChangeEmitter.fire(newUris.concat(this.currentUris));
41
+ this.currentUris = newUris;
42
+ });
43
+ }
44
+
45
+ provideDecorations(uri: URI, token: CancellationToken): Decoration | Promise<Decoration | undefined> | undefined {
46
+ const markers = this.problemManager.findMarkers({ uri }).filter(ProblemUtils.filterMarker).sort(ProblemUtils.severityCompareMarker);
47
+ if (markers.length) {
48
+ return {
49
+ bubble: true,
50
+ letter: markers.length.toString(),
51
+ weight: ProblemUtils.getPriority(markers[0]),
52
+ colorId: ProblemUtils.getColor(markers[0]),
53
+ tooltip: markers.length === 1 ? nls.localizeByDefault('1 problem in this file') : nls.localizeByDefault('{0} problems in this file', markers.length),
54
+ };
55
+ }
56
+ }
57
+ }
58
+
59
+ @injectable()
60
+ export class ProblemDecorationContribution implements FrontendApplicationContribution {
61
+ @inject(DecorationsService) protected readonly decorationsService: DecorationsService;
62
+ @inject(ProblemDecorationsProvider) protected readonly problemDecorationProvider: ProblemDecorationsProvider;
63
+
64
+ initialize(): void {
65
+ this.decorationsService.registerDecorationsProvider(this.problemDecorationProvider);
66
+ }
67
+ }
@@ -26,11 +26,13 @@ import { Marker } from '../../common/marker';
26
26
  import { ProblemManager } from './problem-manager';
27
27
  import { ProblemPreferences } from './problem-preferences';
28
28
  import { ProblemUtils } from './problem-utils';
29
- import { OpenEditorNode } from '@theia/navigator/lib/browser/open-editors-widget/navigator-open-editors-tree-model';
30
29
  import { LabelProvider } from '@theia/core/lib/browser';
31
30
  import { WorkspaceService } from '@theia/workspace/lib/browser';
32
- import { WidgetDecoration } from '@theia/core/lib/browser/widget-decoration';
33
31
 
32
+ /**
33
+ * @deprecated since 1.25.0
34
+ * URI-based decorators should implement `DecorationsProvider` and contribute decorations via the `DecorationsService`.
35
+ */
34
36
  @injectable()
35
37
  export class ProblemDecorator implements TreeDecorator {
36
38
 
@@ -85,10 +87,8 @@ export class ProblemDecorator implements TreeDecorator {
85
87
  for (const node of new DepthFirstTreeIterator(tree.root)) {
86
88
  const nodeUri = this.getUriFromNode(node);
87
89
  if (nodeUri) {
88
- let decorator = baseDecorations.get(nodeUri);
89
- if (OpenEditorNode.is(node)) {
90
- decorator = this.appendSuffixDecoration(node.uri, decorator);
91
- } else if (decorator) {
90
+ const decorator = baseDecorations.get(nodeUri);
91
+ if (decorator) {
92
92
  this.appendContainerMarkers(node, decorator, decorations);
93
93
  }
94
94
  if (decorator) {
@@ -99,20 +99,6 @@ export class ProblemDecorator implements TreeDecorator {
99
99
  return decorations;
100
100
  }
101
101
 
102
- protected appendSuffixDecoration(nodeURI: URI, existingDecorations?: TreeDecoration.Data): TreeDecoration.Data {
103
- const workspaceAndPath = this.generateCaptionSuffix(nodeURI);
104
- const color = existingDecorations?.fontData?.color;
105
- const captionSuffix: WidgetDecoration.CaptionAffix = { data: workspaceAndPath };
106
- if (color) {
107
- Object.assign(captionSuffix, { fontData: { color } });
108
- }
109
- const suffixDecorations: TreeDecoration.Data = {
110
- captionSuffixes: [captionSuffix]
111
- };
112
- const decorator = existingDecorations ?? {};
113
- return Object.assign(decorator, suffixDecorations);
114
- }
115
-
116
102
  protected generateCaptionSuffix(nodeURI: URI): string {
117
103
  const workspaceRoots = this.workspaceService.tryGetRoots();
118
104
  const parentWorkspace = this.workspaceService.getWorkspaceRootUri(nodeURI);
@@ -23,8 +23,6 @@ import { createProblemWidget } from './problem-container';
23
23
  import { FrontendApplicationContribution, bindViewContribution, ApplicationShellLayoutMigration, LabelProviderContribution } from '@theia/core/lib/browser';
24
24
  import { ProblemManager } from './problem-manager';
25
25
  import { WidgetFactory } from '@theia/core/lib/browser/widget-manager';
26
- import { NavigatorTreeDecorator } from '@theia/navigator/lib/browser/navigator-decorator-service';
27
- import { ProblemDecorator } from './problem-decorator';
28
26
  import { ProblemTabBarDecorator } from './problem-tabbar-decorator';
29
27
  import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
30
28
  import { ProblemLayoutVersion3Migration } from './problem-layout-migrations';
@@ -32,7 +30,7 @@ import { TabBarDecorator } from '@theia/core/lib/browser/shell/tab-bar-decorator
32
30
  import { bindProblemPreferences } from './problem-preferences';
33
31
  import { MarkerTreeLabelProvider } from '../marker-tree-label-provider';
34
32
  import { ProblemWidgetTabBarDecorator } from './problem-widget-tab-bar-decorator';
35
- import { OpenEditorsTreeDecorator } from '@theia/navigator/lib/browser/open-editors-widget/navigator-open-editors-decorator-service';
33
+ import { ProblemDecorationContribution, ProblemDecorationsProvider } from './problem-decorations-provider';
36
34
 
37
35
  export default new ContainerModule(bind => {
38
36
  bindProblemPreferences(bind);
@@ -52,11 +50,11 @@ export default new ContainerModule(bind => {
52
50
  bind(FrontendApplicationContribution).toService(ProblemContribution);
53
51
  bind(TabBarToolbarContribution).toService(ProblemContribution);
54
52
 
55
- bind(ProblemDecorator).toSelf().inSingletonScope();
56
- bind(NavigatorTreeDecorator).toService(ProblemDecorator);
57
- bind(OpenEditorsTreeDecorator).toService(ProblemDecorator);
53
+ bind(ProblemDecorationsProvider).toSelf().inSingletonScope();
58
54
  bind(ProblemTabBarDecorator).toSelf().inSingletonScope();
59
55
  bind(TabBarDecorator).toService(ProblemTabBarDecorator);
56
+ bind(ProblemDecorationContribution).toSelf().inSingletonScope();
57
+ bind(FrontendApplicationContribution).toService(ProblemDecorationContribution);
60
58
 
61
59
  bind(MarkerTreeLabelProvider).toSelf().inSingletonScope();
62
60
  bind(LabelProviderContribution).toService(MarkerTreeLabelProvider);
@@ -63,4 +63,29 @@ export namespace ProblemUtils {
63
63
  */
64
64
  export const ownerCompare = (a: Marker<Diagnostic>, b: Marker<Diagnostic>): number => a.owner.localeCompare(b.owner);
65
65
 
66
+ export function getPriority(marker: Marker<Diagnostic>): number {
67
+ const { severity } = marker.data;
68
+ switch (severity) {
69
+ case DiagnosticSeverity.Error: return 30;
70
+ case DiagnosticSeverity.Warning: return 20;
71
+ case DiagnosticSeverity.Information: return 10;
72
+ default: return 0;
73
+ }
74
+ }
75
+
76
+ export function getColor(marker: Marker<Diagnostic>): string {
77
+ const { severity } = marker.data;
78
+ switch (severity) {
79
+ case DiagnosticSeverity.Error: return 'list.errorForeground';
80
+ case DiagnosticSeverity.Warning: return 'list.warningForeground';
81
+ default: return 'successBackground';
82
+ }
83
+ }
84
+
85
+ export function filterMarker(marker: Marker<Diagnostic>): boolean {
86
+ const { severity } = marker.data;
87
+ return severity === DiagnosticSeverity.Error
88
+ || severity === DiagnosticSeverity.Warning
89
+ || severity === DiagnosticSeverity.Information;
90
+ }
66
91
  }