@codingame/monaco-vscode-markers-service-override 3.2.3 → 4.0.0
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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/markers/browser/markers.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/markers/browser/markersFileDecorations.js +128 -0
- package/vscode/src/vs/workbench/contrib/markers/browser/markersTable.js +23 -13
- package/vscode/src/vs/workbench/contrib/markers/browser/markersTreeViewer.js +19 -15
- package/vscode/src/vs/workbench/contrib/markers/browser/markersViewActions.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-markers-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import './markersFileDecorations.js';
|
|
2
3
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
4
|
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
5
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
3
|
+
import { MarkerSeverity, IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
4
|
+
import { IDecorationsService } from 'vscode/vscode/vs/workbench/services/decorations/common/decorations';
|
|
5
|
+
import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
7
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
8
|
+
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
9
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
10
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
11
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
|
|
12
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
|
|
13
|
+
import { listErrorForeground, listWarningForeground } from 'vscode/vscode/vs/platform/theme/common/colors/listColors';
|
|
14
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
|
|
15
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
16
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
17
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
18
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
19
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
20
|
+
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
21
|
+
|
|
22
|
+
class MarkersDecorationsProvider {
|
|
23
|
+
constructor(_markerService) {
|
|
24
|
+
this._markerService = _markerService;
|
|
25
|
+
this.label = ( localizeWithPath(
|
|
26
|
+
'vs/workbench/contrib/markers/browser/markersFileDecorations',
|
|
27
|
+
'label',
|
|
28
|
+
"Problems"
|
|
29
|
+
));
|
|
30
|
+
this.onDidChange = _markerService.onMarkerChanged;
|
|
31
|
+
}
|
|
32
|
+
provideDecorations(resource) {
|
|
33
|
+
const markers = this._markerService.read({
|
|
34
|
+
resource,
|
|
35
|
+
severities: MarkerSeverity.Error | MarkerSeverity.Warning
|
|
36
|
+
});
|
|
37
|
+
let first;
|
|
38
|
+
for (const marker of markers) {
|
|
39
|
+
if (!first || marker.severity > first.severity) {
|
|
40
|
+
first = marker;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (!first) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
weight: 100 * first.severity,
|
|
48
|
+
bubble: true,
|
|
49
|
+
tooltip: markers.length === 1 ? ( localizeWithPath(
|
|
50
|
+
'vs/workbench/contrib/markers/browser/markersFileDecorations',
|
|
51
|
+
'tooltip.1',
|
|
52
|
+
"1 problem in this file"
|
|
53
|
+
)) : ( localizeWithPath(
|
|
54
|
+
'vs/workbench/contrib/markers/browser/markersFileDecorations',
|
|
55
|
+
'tooltip.N',
|
|
56
|
+
"{0} problems in this file",
|
|
57
|
+
markers.length
|
|
58
|
+
)),
|
|
59
|
+
letter: markers.length < 10 ? ( markers.length.toString()) : '9+',
|
|
60
|
+
color: first.severity === MarkerSeverity.Error ? listErrorForeground : listWarningForeground,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
let MarkersFileDecorations = class MarkersFileDecorations {
|
|
65
|
+
constructor(_markerService, _decorationsService, _configurationService) {
|
|
66
|
+
this._markerService = _markerService;
|
|
67
|
+
this._decorationsService = _decorationsService;
|
|
68
|
+
this._configurationService = _configurationService;
|
|
69
|
+
this._disposables = [
|
|
70
|
+
this._configurationService.onDidChangeConfiguration(e => {
|
|
71
|
+
if (e.affectsConfiguration('problems.visibility')) {
|
|
72
|
+
this._updateEnablement();
|
|
73
|
+
}
|
|
74
|
+
}),
|
|
75
|
+
];
|
|
76
|
+
this._updateEnablement();
|
|
77
|
+
}
|
|
78
|
+
dispose() {
|
|
79
|
+
dispose(this._provider);
|
|
80
|
+
dispose(this._disposables);
|
|
81
|
+
}
|
|
82
|
+
_updateEnablement() {
|
|
83
|
+
const problem = this._configurationService.getValue('problems.visibility');
|
|
84
|
+
if (problem === undefined) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const value = this._configurationService.getValue('problems');
|
|
88
|
+
const shouldEnable = (problem && value.decorations.enabled);
|
|
89
|
+
if (shouldEnable === this._enabled) {
|
|
90
|
+
if (!problem || !value.decorations.enabled) {
|
|
91
|
+
this._provider?.dispose();
|
|
92
|
+
this._provider = undefined;
|
|
93
|
+
}
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this._enabled = shouldEnable;
|
|
97
|
+
if (this._enabled) {
|
|
98
|
+
const provider = ( new MarkersDecorationsProvider(this._markerService));
|
|
99
|
+
this._provider = this._decorationsService.registerDecorationsProvider(provider);
|
|
100
|
+
}
|
|
101
|
+
else if (this._provider) {
|
|
102
|
+
this._provider.dispose();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
MarkersFileDecorations = ( __decorate([
|
|
107
|
+
( __param(0, IMarkerService)),
|
|
108
|
+
( __param(1, IDecorationsService)),
|
|
109
|
+
( __param(2, IConfigurationService))
|
|
110
|
+
], MarkersFileDecorations));
|
|
111
|
+
( Registry.as(Extensions.Configuration)).registerConfiguration({
|
|
112
|
+
'id': 'problems',
|
|
113
|
+
'order': 101,
|
|
114
|
+
'type': 'object',
|
|
115
|
+
'properties': {
|
|
116
|
+
'problems.decorations.enabled': {
|
|
117
|
+
'markdownDescription': ( localizeWithPath(
|
|
118
|
+
'vs/workbench/contrib/markers/browser/markersFileDecorations',
|
|
119
|
+
'markers.showOnFile',
|
|
120
|
+
"Show Errors & Warnings on files and folder. Overwritten by `#problems.visibility#` when it is off."
|
|
121
|
+
)),
|
|
122
|
+
'type': 'boolean',
|
|
123
|
+
'default': true
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
( Registry.as(Extensions$1.Workbench))
|
|
128
|
+
.registerWorkbenchContribution(MarkersFileDecorations, 3 );
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { append, $ as $$1, findParentWithClass } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
4
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
5
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { DisposableStore, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { WorkbenchTable } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
8
8
|
import { HighlightedLabel } from 'vscode/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
|
@@ -20,7 +20,7 @@ import Messages from './messages.js';
|
|
|
20
20
|
import { isUndefinedOrNull } from 'vscode/vscode/vs/base/common/types';
|
|
21
21
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
22
22
|
import { unsupportedSchemas } from 'vscode/vscode/vs/platform/markers/common/markerService';
|
|
23
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
23
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
24
24
|
|
|
25
25
|
var MarkerSeverityColumnRenderer_1, MarkerCodeColumnRenderer_1, MarkerFileColumnRenderer_1;
|
|
26
26
|
const $ = $$1;
|
|
@@ -37,7 +37,7 @@ let MarkerSeverityColumnRenderer = class MarkerSeverityColumnRenderer {
|
|
|
37
37
|
const icon = append(severityColumn, $(''));
|
|
38
38
|
const actionBarColumn = append(container, $('.actions'));
|
|
39
39
|
const actionBar = ( new ActionBar(actionBarColumn, {
|
|
40
|
-
actionViewItemProvider: (action) => action.id === QuickFixAction.ID ? this.instantiationService.createInstance(QuickFixActionViewItem, action) : undefined
|
|
40
|
+
actionViewItemProvider: (action, options) => action.id === QuickFixAction.ID ? this.instantiationService.createInstance(QuickFixActionViewItem, action, options) : undefined
|
|
41
41
|
}));
|
|
42
42
|
return { actionBar, icon };
|
|
43
43
|
}
|
|
@@ -49,7 +49,7 @@ let MarkerSeverityColumnRenderer = class MarkerSeverityColumnRenderer {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
templateData.icon.title = ( MarkerSeverity.toString(element.marker.severity));
|
|
52
|
-
templateData.icon.className = `marker-icon ${( Severity.toString(MarkerSeverity.toSeverity(element.marker.severity)))} codicon ${SeverityIcon.className(MarkerSeverity.toSeverity(element.marker.severity))}`;
|
|
52
|
+
templateData.icon.className = `marker-icon ${( Severity$1.toString(MarkerSeverity.toSeverity(element.marker.severity)))} codicon ${SeverityIcon.className(MarkerSeverity.toSeverity(element.marker.severity))}`;
|
|
53
53
|
templateData.actionBar.clear();
|
|
54
54
|
const viewModel = this.markersViewModel.getViewModel(element);
|
|
55
55
|
if (viewModel) {
|
|
@@ -78,13 +78,14 @@ let MarkerCodeColumnRenderer = class MarkerCodeColumnRenderer {
|
|
|
78
78
|
this.templateId = MarkerCodeColumnRenderer_1.TEMPLATE_ID;
|
|
79
79
|
}
|
|
80
80
|
renderTemplate(container) {
|
|
81
|
+
const templateDisposable = ( new DisposableStore());
|
|
81
82
|
const codeColumn = append(container, $('.code'));
|
|
82
|
-
const sourceLabel = ( new HighlightedLabel(codeColumn));
|
|
83
|
+
const sourceLabel = templateDisposable.add(( new HighlightedLabel(codeColumn)));
|
|
83
84
|
sourceLabel.element.classList.add('source-label');
|
|
84
|
-
const codeLabel = ( new HighlightedLabel(codeColumn));
|
|
85
|
+
const codeLabel = templateDisposable.add(( new HighlightedLabel(codeColumn)));
|
|
85
86
|
codeLabel.element.classList.add('code-label');
|
|
86
|
-
const codeLink = ( new Link(codeColumn, { href: '', label: '' }, {}, this.openerService));
|
|
87
|
-
return { codeColumn, sourceLabel, codeLabel, codeLink };
|
|
87
|
+
const codeLink = templateDisposable.add(( new Link(codeColumn, { href: '', label: '' }, {}, this.openerService)));
|
|
88
|
+
return { codeColumn, sourceLabel, codeLabel, codeLink, templateDisposable };
|
|
88
89
|
}
|
|
89
90
|
renderElement(element, index, templateData, height) {
|
|
90
91
|
templateData.codeColumn.classList.remove('code-label');
|
|
@@ -100,7 +101,7 @@ let MarkerCodeColumnRenderer = class MarkerCodeColumnRenderer {
|
|
|
100
101
|
templateData.codeColumn.classList.add('code-link');
|
|
101
102
|
templateData.codeColumn.title = `${element.marker.source} (${element.marker.code.value})`;
|
|
102
103
|
templateData.sourceLabel.set(element.marker.source, element.sourceMatches);
|
|
103
|
-
const codeLinkLabel = ( new HighlightedLabel($('.code-link-label')));
|
|
104
|
+
const codeLinkLabel = templateData.templateDisposable.add(( new HighlightedLabel($('.code-link-label'))));
|
|
104
105
|
codeLinkLabel.set(element.marker.code.value, element.codeMatches);
|
|
105
106
|
templateData.codeLink.link = {
|
|
106
107
|
href: ( element.marker.code.target.toString()),
|
|
@@ -114,7 +115,9 @@ let MarkerCodeColumnRenderer = class MarkerCodeColumnRenderer {
|
|
|
114
115
|
templateData.sourceLabel.set('-');
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
disposeTemplate(templateData) {
|
|
118
|
+
disposeTemplate(templateData) {
|
|
119
|
+
templateData.templateDisposable.dispose();
|
|
120
|
+
}
|
|
118
121
|
};
|
|
119
122
|
MarkerCodeColumnRenderer = MarkerCodeColumnRenderer_1 = ( __decorate([
|
|
120
123
|
( __param(0, IOpenerService))
|
|
@@ -133,7 +136,9 @@ class MarkerMessageColumnRenderer {
|
|
|
133
136
|
templateData.columnElement.title = element.marker.message;
|
|
134
137
|
templateData.highlightedLabel.set(element.marker.message, element.messageMatches);
|
|
135
138
|
}
|
|
136
|
-
disposeTemplate(templateData) {
|
|
139
|
+
disposeTemplate(templateData) {
|
|
140
|
+
templateData.highlightedLabel.dispose();
|
|
141
|
+
}
|
|
137
142
|
}
|
|
138
143
|
let MarkerFileColumnRenderer = class MarkerFileColumnRenderer {
|
|
139
144
|
static { MarkerFileColumnRenderer_1 = this; }
|
|
@@ -156,7 +161,10 @@ let MarkerFileColumnRenderer = class MarkerFileColumnRenderer {
|
|
|
156
161
|
templateData.fileLabel.set(this.labelService.getUriLabel(element.marker.resource, { relative: true }), element.fileMatches);
|
|
157
162
|
templateData.positionLabel.set(positionLabel, undefined);
|
|
158
163
|
}
|
|
159
|
-
disposeTemplate(templateData) {
|
|
164
|
+
disposeTemplate(templateData) {
|
|
165
|
+
templateData.fileLabel.dispose();
|
|
166
|
+
templateData.positionLabel.dispose();
|
|
167
|
+
}
|
|
160
168
|
};
|
|
161
169
|
MarkerFileColumnRenderer = MarkerFileColumnRenderer_1 = ( __decorate([
|
|
162
170
|
( __param(0, ILabelService))
|
|
@@ -175,7 +183,9 @@ class MarkerOwnerColumnRenderer {
|
|
|
175
183
|
templateData.columnElement.title = element.marker.owner;
|
|
176
184
|
templateData.highlightedLabel.set(element.marker.owner, element.ownerMatches);
|
|
177
185
|
}
|
|
178
|
-
disposeTemplate(templateData) {
|
|
186
|
+
disposeTemplate(templateData) {
|
|
187
|
+
templateData.highlightedLabel.dispose();
|
|
188
|
+
}
|
|
179
189
|
}
|
|
180
190
|
class MarkersTableVirtualDelegate {
|
|
181
191
|
constructor() {
|
|
@@ -5,7 +5,7 @@ import { dirname, basename as basename$1 } from 'vscode/vscode/vs/base/common/pa
|
|
|
5
5
|
import { CountBadge } from 'vscode/vscode/vs/base/browser/ui/countBadge/countBadge';
|
|
6
6
|
import { HighlightedLabel } from 'vscode/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
|
7
7
|
import { MarkerSeverity } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
8
|
-
import {
|
|
8
|
+
import { Marker, ResourceMarkers, MarkerTableItem, RelatedInformation } from './markersModel.js';
|
|
9
9
|
import Messages from './messages.js';
|
|
10
10
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
11
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
@@ -38,7 +38,9 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
38
38
|
import { MarkersContextKeys } from 'vscode/vscode/vs/workbench/contrib/markers/common/markers';
|
|
39
39
|
import { unsupportedSchemas } from 'vscode/vscode/vs/platform/markers/common/markerService';
|
|
40
40
|
import { defaultCountBadgeStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
41
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
41
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
42
|
+
import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
|
|
43
|
+
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
42
44
|
|
|
43
45
|
let MarkersWidgetAccessibilityProvider = class MarkersWidgetAccessibilityProvider {
|
|
44
46
|
constructor(labelService) {
|
|
@@ -217,17 +219,18 @@ class MarkerWidget extends Disposable {
|
|
|
217
219
|
this._openerService = _openerService;
|
|
218
220
|
this.disposables = this._register(( new DisposableStore()));
|
|
219
221
|
this.actionBar = this._register(( new ActionBar(append(parent, $('.actions')), {
|
|
220
|
-
actionViewItemProvider: (action) => action.id === QuickFixAction.ID ? _instantiationService.createInstance(QuickFixActionViewItem, action) : undefined
|
|
222
|
+
actionViewItemProvider: (action, options) => action.id === QuickFixAction.ID ? _instantiationService.createInstance(QuickFixActionViewItem, action, options) : undefined
|
|
221
223
|
})));
|
|
222
224
|
this.iconContainer = append(parent, $(''));
|
|
223
225
|
this.icon = append(this.iconContainer, $(''));
|
|
224
226
|
this.messageAndDetailsContainer = append(parent, $('.marker-message-details-container'));
|
|
227
|
+
this.messageAndDetailsContainerHover = this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.messageAndDetailsContainer, ''));
|
|
225
228
|
}
|
|
226
229
|
render(element, filterData) {
|
|
227
230
|
this.actionBar.clear();
|
|
228
231
|
this.disposables.clear();
|
|
229
232
|
clearNode(this.messageAndDetailsContainer);
|
|
230
|
-
this.iconContainer.className = `marker-icon ${( Severity.toString(MarkerSeverity.toSeverity(element.marker.severity)))}`;
|
|
233
|
+
this.iconContainer.className = `marker-icon ${( Severity$1.toString(MarkerSeverity.toSeverity(element.marker.severity)))}`;
|
|
231
234
|
this.icon.className = `codicon ${SeverityIcon.className(MarkerSeverity.toSeverity(element.marker.severity))}`;
|
|
232
235
|
this.renderQuickfixActionbar(element);
|
|
233
236
|
this.renderMessageAndDetails(element, filterData);
|
|
@@ -255,9 +258,9 @@ class MarkerWidget extends Disposable {
|
|
|
255
258
|
}
|
|
256
259
|
renderMultilineActionbar(marker, parent) {
|
|
257
260
|
const multilineActionbar = this.disposables.add(( new ActionBar(append(parent, $('.multiline-actions')), {
|
|
258
|
-
actionViewItemProvider: (action) => {
|
|
261
|
+
actionViewItemProvider: (action, options) => {
|
|
259
262
|
if (action.id === toggleMultilineAction) {
|
|
260
|
-
return ( new ToggleMultilineActionViewItem(undefined, action, { icon: true }));
|
|
263
|
+
return ( new ToggleMultilineActionViewItem(undefined, action, { ...options, icon: true }));
|
|
261
264
|
}
|
|
262
265
|
return undefined;
|
|
263
266
|
}
|
|
@@ -287,12 +290,12 @@ class MarkerWidget extends Disposable {
|
|
|
287
290
|
const viewState = this.markersViewModel.getViewModel(element);
|
|
288
291
|
const multiline = !viewState || viewState.multiline;
|
|
289
292
|
const lineMatches = filterData && filterData.lineMatches || [];
|
|
290
|
-
this.
|
|
293
|
+
this.messageAndDetailsContainerHover.update(element.marker.message);
|
|
291
294
|
const lineElements = [];
|
|
292
295
|
for (let index = 0; index < (multiline ? lines.length : 1); index++) {
|
|
293
296
|
const lineElement = append(this.messageAndDetailsContainer, $('.marker-message-line'));
|
|
294
297
|
const messageElement = append(lineElement, $('.marker-message'));
|
|
295
|
-
const highlightedLabel = ( new HighlightedLabel(messageElement));
|
|
298
|
+
const highlightedLabel = this.disposables.add(( new HighlightedLabel(messageElement)));
|
|
296
299
|
highlightedLabel.set(lines[index].length > 1000 ? `${lines[index].substring(0, 1000)}...` : lines[index], lineMatches[index]);
|
|
297
300
|
if (lines[index] === '') {
|
|
298
301
|
lineElement.style.height = `${VirtualDelegate.LINE_HEIGHT}px`;
|
|
@@ -305,18 +308,18 @@ class MarkerWidget extends Disposable {
|
|
|
305
308
|
renderDetails(marker, filterData, parent) {
|
|
306
309
|
parent.classList.add('details-container');
|
|
307
310
|
if (marker.source || marker.code) {
|
|
308
|
-
const source = ( new HighlightedLabel(append(parent, $('.marker-source'))));
|
|
311
|
+
const source = this.disposables.add(( new HighlightedLabel(append(parent, $('.marker-source')))));
|
|
309
312
|
const sourceMatches = filterData && filterData.sourceMatches || [];
|
|
310
313
|
source.set(marker.source, sourceMatches);
|
|
311
314
|
if (marker.code) {
|
|
312
315
|
if (typeof marker.code === 'string') {
|
|
313
|
-
const code = ( new HighlightedLabel(append(parent, $('.marker-code'))));
|
|
316
|
+
const code = this.disposables.add(( new HighlightedLabel(append(parent, $('.marker-code')))));
|
|
314
317
|
const codeMatches = filterData && filterData.codeMatches || [];
|
|
315
318
|
code.set(marker.code, codeMatches);
|
|
316
319
|
}
|
|
317
320
|
else {
|
|
318
321
|
const container = $('.marker-code');
|
|
319
|
-
const code = ( new HighlightedLabel(container));
|
|
322
|
+
const code = this.disposables.add(( new HighlightedLabel(container)));
|
|
320
323
|
const link = ( marker.code.target.toString(true));
|
|
321
324
|
this.disposables.add(( new Link(
|
|
322
325
|
parent,
|
|
@@ -354,13 +357,14 @@ let RelatedInformationRenderer = class RelatedInformationRenderer {
|
|
|
354
357
|
const relatedInformation = node.element.raw;
|
|
355
358
|
const uriMatches = node.filterData && node.filterData.uriMatches || [];
|
|
356
359
|
const messageMatches = node.filterData && node.filterData.messageMatches || [];
|
|
357
|
-
|
|
358
|
-
templateData.resourceLabel.
|
|
360
|
+
const resourceLabelTitle = this.labelService.getUriLabel(relatedInformation.resource, { relative: true });
|
|
361
|
+
templateData.resourceLabel.set(basename(relatedInformation.resource), uriMatches, resourceLabelTitle);
|
|
359
362
|
templateData.lnCol.textContent = Messages.MARKERS_PANEL_AT_LINE_COL_NUMBER(relatedInformation.startLineNumber, relatedInformation.startColumn);
|
|
360
|
-
templateData.description.set(relatedInformation.message, messageMatches);
|
|
361
|
-
templateData.description.element.title = relatedInformation.message;
|
|
363
|
+
templateData.description.set(relatedInformation.message, messageMatches, relatedInformation.message);
|
|
362
364
|
}
|
|
363
365
|
disposeTemplate(templateData) {
|
|
366
|
+
templateData.resourceLabel.dispose();
|
|
367
|
+
templateData.description.dispose();
|
|
364
368
|
}
|
|
365
369
|
};
|
|
366
370
|
RelatedInformationRenderer = ( __decorate([
|
|
@@ -102,8 +102,8 @@ class QuickFixAction extends Action {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
let QuickFixActionViewItem = class QuickFixActionViewItem extends ActionViewItem {
|
|
105
|
-
constructor(action, contextMenuService) {
|
|
106
|
-
super(null, action, { icon: true, label: false });
|
|
105
|
+
constructor(action, options, contextMenuService) {
|
|
106
|
+
super(null, action, { ...options, icon: true, label: false });
|
|
107
107
|
this.contextMenuService = contextMenuService;
|
|
108
108
|
}
|
|
109
109
|
onClick(event) {
|
|
@@ -128,7 +128,7 @@ let QuickFixActionViewItem = class QuickFixActionViewItem extends ActionViewItem
|
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
QuickFixActionViewItem = ( __decorate([
|
|
131
|
-
( __param(
|
|
131
|
+
( __param(2, IContextMenuService))
|
|
132
132
|
], QuickFixActionViewItem));
|
|
133
133
|
|
|
134
134
|
export { MarkersFilters, QuickFixAction, QuickFixActionViewItem };
|