@theia/markers 1.24.0-next.2 → 1.24.0-next.22
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.
- package/lib/browser/marker-manager.d.ts +1 -0
- package/lib/browser/marker-manager.d.ts.map +1 -1
- package/lib/browser/marker-manager.js +3 -0
- package/lib/browser/marker-manager.js.map +1 -1
- package/lib/browser/problem/problem-decorator.d.ts +14 -6
- package/lib/browser/problem/problem-decorator.d.ts.map +1 -1
- package/lib/browser/problem/problem-decorator.js +49 -67
- package/lib/browser/problem/problem-decorator.js.map +1 -1
- package/package.json +6 -6
- package/src/browser/marker-manager.ts +4 -0
- package/src/browser/problem/problem-decorator.ts +49 -67
|
@@ -40,6 +40,7 @@ export declare abstract class MarkerManager<D extends object> {
|
|
|
40
40
|
protected fireOnDidChangeMarkers(uri: URI): void;
|
|
41
41
|
setMarkers(uri: URI, owner: string, data: D[]): Marker<D>[];
|
|
42
42
|
findMarkers(filter?: SearchFilter<D>): Marker<D>[];
|
|
43
|
+
getMarkersByUri(): IterableIterator<[string, MarkerCollection<D>]>;
|
|
43
44
|
getUris(): IterableIterator<string>;
|
|
44
45
|
cleanAllMarkers(uri?: URI): void;
|
|
45
46
|
protected doCleanAllMarkers(uri: URI): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker-manager.d.ts","sourceRoot":"","sources":["../../src/browser/marker-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAkB,MAAM,oCAAoC,CAAC;AAKtF,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,GAAG,CAAC,EAAE,GAAG,CA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AAjBiB,aAAa;IADlC,IAAA,sBAAU,GAAE;GACS,aAAa,CA6FlC;AA7FqB,sCAAa"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Diagnostic } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
2
2
|
import URI from '@theia/core/lib/common/uri';
|
|
3
3
|
import { Event, Emitter } from '@theia/core/lib/common/event';
|
|
4
|
-
import { Tree } from '@theia/core/lib/browser/tree/tree';
|
|
4
|
+
import { Tree, TreeNode } from '@theia/core/lib/browser/tree/tree';
|
|
5
5
|
import { TreeDecorator, TreeDecoration } from '@theia/core/lib/browser/tree/tree-decorator';
|
|
6
6
|
import { Marker } from '../../common/marker';
|
|
7
7
|
import { ProblemManager } from './problem-manager';
|
|
@@ -23,11 +23,17 @@ export declare class ProblemDecorator implements TreeDecorator {
|
|
|
23
23
|
protected collectDecorators(tree: Tree): Map<string, TreeDecoration.Data>;
|
|
24
24
|
protected appendSuffixDecoration(nodeURI: URI, existingDecorations?: TreeDecoration.Data): TreeDecoration.Data;
|
|
25
25
|
protected generateCaptionSuffix(nodeURI: URI): string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
protected
|
|
30
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Traverses up the tree from the given node and attaches decorations to any parents.
|
|
28
|
+
*/
|
|
29
|
+
protected appendContainerMarkers(node: TreeNode, decoration: TreeDecoration.Data, decorations: Map<string, TreeDecoration.Data>): void;
|
|
30
|
+
/**
|
|
31
|
+
* @returns a map matching stringified URI's to a decoration whose features reflect the highest-severity problem found
|
|
32
|
+
* and the number of problems found (based on {@link ProblemDecorator.toDecorator })
|
|
33
|
+
*/
|
|
34
|
+
protected collectMarkers(tree: Tree): Map<string, TreeDecoration.Data>;
|
|
35
|
+
protected toDecorator(markers: Marker<Diagnostic>[]): TreeDecoration.Data;
|
|
36
|
+
protected getColor(marker: Marker<Diagnostic>): TreeDecoration.Color;
|
|
31
37
|
/**
|
|
32
38
|
* Get the decoration for a given marker diagnostic.
|
|
33
39
|
* Markers with higher severity have a higher priority and should be displayed.
|
|
@@ -39,7 +45,9 @@ export declare class ProblemDecorator implements TreeDecorator {
|
|
|
39
45
|
* Otherwise, returns `false`.
|
|
40
46
|
*/
|
|
41
47
|
protected filterMarker(marker: Marker<Diagnostic>): boolean;
|
|
48
|
+
protected getUriFromNode(node: TreeNode): string | undefined;
|
|
42
49
|
protected compare(left: Marker<Diagnostic>, right: Marker<Diagnostic>): number;
|
|
50
|
+
protected compareDecorators(left: TreeDecoration.Data, right: TreeDecoration.Data): number;
|
|
43
51
|
}
|
|
44
52
|
export declare namespace ProblemDecorator {
|
|
45
53
|
const severityCompare: (a: Marker<Diagnostic>, b: Marker<Diagnostic>) => number;
|
|
@@ -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;
|
|
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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M;IAkBrD;;OAEG;IACH,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IActI;;;OAGG;IACH,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC;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;IAUpE;;;;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"}
|
|
@@ -31,8 +31,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.ProblemDecorator = void 0;
|
|
32
32
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
33
33
|
const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
34
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
35
|
-
const objects_1 = require("@theia/core/lib/common/objects");
|
|
36
34
|
const event_1 = require("@theia/core/lib/common/event");
|
|
37
35
|
const tree_iterator_1 = require("@theia/core/lib/browser/tree/tree-iterator");
|
|
38
36
|
const tree_decorator_1 = require("@theia/core/lib/browser/tree/tree-decorator");
|
|
@@ -75,21 +73,20 @@ let ProblemDecorator = ProblemDecorator_1 = class ProblemDecorator {
|
|
|
75
73
|
collectDecorators(tree) {
|
|
76
74
|
const decorations = new Map();
|
|
77
75
|
// If the tree root is undefined or the preference for the decorations is disabled, return an empty result map.
|
|
78
|
-
if (tree.root
|
|
76
|
+
if (!tree.root || !this.problemPreferences['problems.decorations.enabled']) {
|
|
79
77
|
return decorations;
|
|
80
78
|
}
|
|
81
|
-
const
|
|
79
|
+
const baseDecorations = this.collectMarkers(tree);
|
|
82
80
|
for (const node of new tree_iterator_1.DepthFirstTreeIterator(tree.root)) {
|
|
83
|
-
const nodeUri =
|
|
81
|
+
const nodeUri = this.getUriFromNode(node);
|
|
84
82
|
if (nodeUri) {
|
|
85
|
-
|
|
86
|
-
let decorator;
|
|
87
|
-
if (marker) {
|
|
88
|
-
decorator = this.toDecorator(marker);
|
|
89
|
-
}
|
|
83
|
+
let decorator = baseDecorations.get(nodeUri);
|
|
90
84
|
if (navigator_open_editors_tree_model_1.OpenEditorNode.is(node)) {
|
|
91
85
|
decorator = this.appendSuffixDecoration(node.uri, decorator);
|
|
92
86
|
}
|
|
87
|
+
else if (decorator) {
|
|
88
|
+
this.appendContainerMarkers(node, decorator, decorations);
|
|
89
|
+
}
|
|
93
90
|
if (decorator) {
|
|
94
91
|
decorations.set(node.id, decorator);
|
|
95
92
|
}
|
|
@@ -130,75 +127,54 @@ let ProblemDecorator = ProblemDecorator_1 = class ProblemDecorator {
|
|
|
130
127
|
}
|
|
131
128
|
return `${workspacePrefixString}${separator}${filePathString}`;
|
|
132
129
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
result.set(parentUriString, {
|
|
148
|
-
data: marker.data,
|
|
149
|
-
uri: parentUriString,
|
|
150
|
-
owner: marker.owner,
|
|
151
|
-
kind: marker.kind
|
|
152
|
-
});
|
|
153
|
-
parentUri = parentUri.parent;
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
parentUri = undefined;
|
|
157
|
-
}
|
|
130
|
+
/**
|
|
131
|
+
* Traverses up the tree from the given node and attaches decorations to any parents.
|
|
132
|
+
*/
|
|
133
|
+
appendContainerMarkers(node, decoration, decorations) {
|
|
134
|
+
let parent = node === null || node === void 0 ? void 0 : node.parent;
|
|
135
|
+
while (parent) {
|
|
136
|
+
const existing = decorations.get(parent.id);
|
|
137
|
+
// Make sure the highest diagnostic severity (smaller number) will be propagated to the container directory.
|
|
138
|
+
if (existing === undefined || this.compareDecorators(existing, decoration) < 0) {
|
|
139
|
+
decorations.set(parent.id, decoration);
|
|
140
|
+
parent = parent.parent;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
break;
|
|
158
144
|
}
|
|
159
145
|
}
|
|
160
|
-
return result;
|
|
161
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* @returns a map matching stringified URI's to a decoration whose features reflect the highest-severity problem found
|
|
149
|
+
* and the number of problems found (based on {@link ProblemDecorator.toDecorator })
|
|
150
|
+
*/
|
|
162
151
|
collectMarkers(tree) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
152
|
+
const decorationsForUri = new Map();
|
|
153
|
+
const compare = this.compare.bind(this);
|
|
154
|
+
const filter = this.filterMarker.bind(this);
|
|
155
|
+
for (const [, markers] of this.problemManager.getMarkersByUri()) {
|
|
156
|
+
const relevant = markers.findMarkers({}).filter(filter).sort(compare);
|
|
157
|
+
if (relevant.length) {
|
|
158
|
+
decorationsForUri.set(relevant[0].uri, this.toDecorator(relevant));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return decorationsForUri;
|
|
170
162
|
}
|
|
171
|
-
toDecorator(
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
const color = this.getOverlayIconColor(marker);
|
|
175
|
-
const priority = this.getPriority(marker);
|
|
163
|
+
toDecorator(markers) {
|
|
164
|
+
const color = this.getColor(markers[0]);
|
|
165
|
+
const priority = this.getPriority(markers[0]);
|
|
176
166
|
return {
|
|
177
167
|
priority,
|
|
178
168
|
fontData: {
|
|
179
169
|
color,
|
|
180
170
|
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
background: {
|
|
186
|
-
shape: 'circle',
|
|
187
|
-
color: 'transparent'
|
|
188
|
-
}
|
|
189
|
-
},
|
|
171
|
+
tailDecorations: [{
|
|
172
|
+
color,
|
|
173
|
+
data: markers.length.toString(),
|
|
174
|
+
}],
|
|
190
175
|
};
|
|
191
176
|
}
|
|
192
|
-
|
|
193
|
-
const { severity } = marker.data;
|
|
194
|
-
switch (severity) {
|
|
195
|
-
case 1: return 'times-circle';
|
|
196
|
-
case 2: return 'exclamation-circle';
|
|
197
|
-
case 3: return 'info-circle';
|
|
198
|
-
default: return 'hand-o-up';
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
getOverlayIconColor(marker) {
|
|
177
|
+
getColor(marker) {
|
|
202
178
|
const { severity } = marker.data;
|
|
203
179
|
switch (severity) {
|
|
204
180
|
case 1: return 'var(--theia-editorError-foreground)';
|
|
@@ -231,9 +207,15 @@ let ProblemDecorator = ProblemDecorator_1 = class ProblemDecorator {
|
|
|
231
207
|
|| severity === vscode_languageserver_protocol_1.DiagnosticSeverity.Warning
|
|
232
208
|
|| severity === vscode_languageserver_protocol_1.DiagnosticSeverity.Information;
|
|
233
209
|
}
|
|
210
|
+
getUriFromNode(node) {
|
|
211
|
+
return browser_1.FileStatNode.getUri(node);
|
|
212
|
+
}
|
|
234
213
|
compare(left, right) {
|
|
235
214
|
return ProblemDecorator_1.severityCompare(left, right);
|
|
236
215
|
}
|
|
216
|
+
compareDecorators(left, right) {
|
|
217
|
+
return tree_decorator_1.TreeDecoration.Data.comparePriority(left, right);
|
|
218
|
+
}
|
|
237
219
|
};
|
|
238
220
|
__decorate([
|
|
239
221
|
(0, inversify_1.inject)(problem_preferences_1.ProblemPreferences),
|
|
@@ -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;;;;;;;;;;;;;;;;AAEhF,4DAAiF;AACjF,sGAAmG;
|
|
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;;;;;;;;;;;;;;;;AAEhF,4DAAiF;AACjF,sGAAmG;AAEnG,wDAA8D;AAE9D,8EAAoF;AACpF,gFAA4F;AAC5F,2DAA6D;AAE7D,uDAAmD;AACnD,+DAA2D;AAC3D,mDAA+C;AAC/C,0IAAoH;AAC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name": "@theia/markers",
|
|
3
|
-
"version": "1.24.0-next.
|
|
3
|
+
"version": "1.24.0-next.22+334b92eed8b",
|
|
4
4
|
"description": "Theia - Markers Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.24.0-next.
|
|
7
|
-
"@theia/filesystem": "1.24.0-next.
|
|
8
|
-
"@theia/navigator": "1.24.0-next.
|
|
9
|
-
"@theia/workspace": "1.24.0-next.
|
|
6
|
+
"@theia/core": "1.24.0-next.22+334b92eed8b",
|
|
7
|
+
"@theia/filesystem": "1.24.0-next.22+334b92eed8b",
|
|
8
|
+
"@theia/navigator": "1.24.0-next.22+334b92eed8b",
|
|
9
|
+
"@theia/workspace": "1.24.0-next.22+334b92eed8b"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"nyc": {
|
|
47
47
|
"extends": "../../configs/nyc.json"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "334b92eed8b1c76f2c062a3891530e631107b7a5"
|
|
50
50
|
}
|
|
@@ -176,6 +176,10 @@ export abstract class MarkerManager<D extends object> {
|
|
|
176
176
|
return result;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
getMarkersByUri(): IterableIterator<[string, MarkerCollection<D>]> {
|
|
180
|
+
return this.uri2MarkerCollection.entries();
|
|
181
|
+
}
|
|
182
|
+
|
|
179
183
|
getUris(): IterableIterator<string> {
|
|
180
184
|
return this.uri2MarkerCollection.keys();
|
|
181
185
|
}
|
|
@@ -17,9 +17,8 @@
|
|
|
17
17
|
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
18
18
|
import { Diagnostic, DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
19
19
|
import URI from '@theia/core/lib/common/uri';
|
|
20
|
-
import { notEmpty } from '@theia/core/lib/common/objects';
|
|
21
20
|
import { Event, Emitter } from '@theia/core/lib/common/event';
|
|
22
|
-
import { Tree } from '@theia/core/lib/browser/tree/tree';
|
|
21
|
+
import { Tree, TreeNode } from '@theia/core/lib/browser/tree/tree';
|
|
23
22
|
import { DepthFirstTreeIterator } from '@theia/core/lib/browser/tree/tree-iterator';
|
|
24
23
|
import { TreeDecorator, TreeDecoration } from '@theia/core/lib/browser/tree/tree-decorator';
|
|
25
24
|
import { FileStatNode } from '@theia/filesystem/lib/browser';
|
|
@@ -79,20 +78,18 @@ export class ProblemDecorator implements TreeDecorator {
|
|
|
79
78
|
protected collectDecorators(tree: Tree): Map<string, TreeDecoration.Data> {
|
|
80
79
|
const decorations = new Map<string, TreeDecoration.Data>();
|
|
81
80
|
// If the tree root is undefined or the preference for the decorations is disabled, return an empty result map.
|
|
82
|
-
if (tree.root
|
|
81
|
+
if (!tree.root || !this.problemPreferences['problems.decorations.enabled']) {
|
|
83
82
|
return decorations;
|
|
84
83
|
}
|
|
85
|
-
const
|
|
84
|
+
const baseDecorations = this.collectMarkers(tree);
|
|
86
85
|
for (const node of new DepthFirstTreeIterator(tree.root)) {
|
|
87
|
-
const nodeUri =
|
|
86
|
+
const nodeUri = this.getUriFromNode(node);
|
|
88
87
|
if (nodeUri) {
|
|
89
|
-
|
|
90
|
-
let decorator: TreeDecoration.Data | undefined;
|
|
91
|
-
if (marker) {
|
|
92
|
-
decorator = this.toDecorator(marker);
|
|
93
|
-
}
|
|
88
|
+
let decorator = baseDecorations.get(nodeUri);
|
|
94
89
|
if (OpenEditorNode.is(node)) {
|
|
95
90
|
decorator = this.appendSuffixDecoration(node.uri, decorator);
|
|
91
|
+
} else if (decorator) {
|
|
92
|
+
this.appendContainerMarkers(node, decorator, decorations);
|
|
96
93
|
}
|
|
97
94
|
if (decorator) {
|
|
98
95
|
decorations.set(node.id, decorator);
|
|
@@ -134,78 +131,56 @@ export class ProblemDecorator implements TreeDecorator {
|
|
|
134
131
|
return `${workspacePrefixString}${separator}${filePathString}`;
|
|
135
132
|
}
|
|
136
133
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (existing === undefined || this.compare(marker, existing) < 0) {
|
|
151
|
-
result.set(parentUriString, {
|
|
152
|
-
data: marker.data,
|
|
153
|
-
uri: parentUriString,
|
|
154
|
-
owner: marker.owner,
|
|
155
|
-
kind: marker.kind
|
|
156
|
-
});
|
|
157
|
-
parentUri = parentUri.parent;
|
|
158
|
-
} else {
|
|
159
|
-
parentUri = undefined;
|
|
160
|
-
}
|
|
134
|
+
/**
|
|
135
|
+
* Traverses up the tree from the given node and attaches decorations to any parents.
|
|
136
|
+
*/
|
|
137
|
+
protected appendContainerMarkers(node: TreeNode, decoration: TreeDecoration.Data, decorations: Map<string, TreeDecoration.Data>): void {
|
|
138
|
+
let parent = node?.parent;
|
|
139
|
+
while (parent) {
|
|
140
|
+
const existing = decorations.get(parent.id);
|
|
141
|
+
// Make sure the highest diagnostic severity (smaller number) will be propagated to the container directory.
|
|
142
|
+
if (existing === undefined || this.compareDecorators(existing, decoration) < 0) {
|
|
143
|
+
decorations.set(parent.id, decoration);
|
|
144
|
+
parent = parent.parent;
|
|
145
|
+
} else {
|
|
146
|
+
break;
|
|
161
147
|
}
|
|
162
148
|
}
|
|
163
|
-
return result;
|
|
164
149
|
}
|
|
165
150
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
151
|
+
/**
|
|
152
|
+
* @returns a map matching stringified URI's to a decoration whose features reflect the highest-severity problem found
|
|
153
|
+
* and the number of problems found (based on {@link ProblemDecorator.toDecorator })
|
|
154
|
+
*/
|
|
155
|
+
protected collectMarkers(tree: Tree): Map<string, TreeDecoration.Data> {
|
|
156
|
+
const decorationsForUri = new Map();
|
|
157
|
+
const compare = this.compare.bind(this);
|
|
158
|
+
const filter = this.filterMarker.bind(this);
|
|
159
|
+
for (const [, markers] of this.problemManager.getMarkersByUri()) {
|
|
160
|
+
const relevant = markers.findMarkers({}).filter(filter).sort(compare);
|
|
161
|
+
if (relevant.length) {
|
|
162
|
+
decorationsForUri.set(relevant[0].uri, this.toDecorator(relevant));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return decorationsForUri;
|
|
174
166
|
}
|
|
175
167
|
|
|
176
|
-
protected toDecorator(
|
|
177
|
-
const
|
|
178
|
-
const
|
|
179
|
-
const color = this.getOverlayIconColor(marker);
|
|
180
|
-
const priority = this.getPriority(marker);
|
|
168
|
+
protected toDecorator(markers: Marker<Diagnostic>[]): TreeDecoration.Data {
|
|
169
|
+
const color = this.getColor(markers[0]);
|
|
170
|
+
const priority = this.getPriority(markers[0]);
|
|
181
171
|
return {
|
|
182
172
|
priority,
|
|
183
173
|
fontData: {
|
|
184
174
|
color,
|
|
185
175
|
},
|
|
186
|
-
|
|
187
|
-
position,
|
|
188
|
-
icon,
|
|
176
|
+
tailDecorations: [{
|
|
189
177
|
color,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
color: 'transparent'
|
|
193
|
-
}
|
|
194
|
-
},
|
|
178
|
+
data: markers.length.toString(),
|
|
179
|
+
}],
|
|
195
180
|
};
|
|
196
181
|
}
|
|
197
182
|
|
|
198
|
-
protected
|
|
199
|
-
const { severity } = marker.data;
|
|
200
|
-
switch (severity) {
|
|
201
|
-
case 1: return 'times-circle';
|
|
202
|
-
case 2: return 'exclamation-circle';
|
|
203
|
-
case 3: return 'info-circle';
|
|
204
|
-
default: return 'hand-o-up';
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
protected getOverlayIconColor(marker: Marker<Diagnostic>): TreeDecoration.Color {
|
|
183
|
+
protected getColor(marker: Marker<Diagnostic>): TreeDecoration.Color {
|
|
209
184
|
const { severity } = marker.data;
|
|
210
185
|
switch (severity) {
|
|
211
186
|
case 1: return 'var(--theia-editorError-foreground)';
|
|
@@ -241,10 +216,17 @@ export class ProblemDecorator implements TreeDecorator {
|
|
|
241
216
|
|| severity === DiagnosticSeverity.Information;
|
|
242
217
|
}
|
|
243
218
|
|
|
219
|
+
protected getUriFromNode(node: TreeNode): string | undefined {
|
|
220
|
+
return FileStatNode.getUri(node);
|
|
221
|
+
}
|
|
222
|
+
|
|
244
223
|
protected compare(left: Marker<Diagnostic>, right: Marker<Diagnostic>): number {
|
|
245
224
|
return ProblemDecorator.severityCompare(left, right);
|
|
246
225
|
}
|
|
247
226
|
|
|
227
|
+
protected compareDecorators(left: TreeDecoration.Data, right: TreeDecoration.Data): number {
|
|
228
|
+
return TreeDecoration.Data.comparePriority(left, right);
|
|
229
|
+
}
|
|
248
230
|
}
|
|
249
231
|
|
|
250
232
|
export namespace ProblemDecorator {
|