@codingame/monaco-vscode-testing-service-override 25.1.2 → 26.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 +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackWidget.js +228 -136
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +301 -214
- package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDisplayUtils.js +31 -22
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/index.js +20 -25
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.js +25 -16
- package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.js +32 -18
- package/vscode/src/vs/workbench/contrib/testing/browser/icons.js +56 -46
- package/vscode/src/vs/workbench/contrib/testing/browser/media/testing.css +2 -0
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageBars.js +71 -55
- package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageView.js +254 -183
- package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.js +479 -398
- package/vscode/src/vs/workbench/contrib/testing/browser/testMessageColorizer.js +13 -21
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.js +126 -76
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.js +214 -166
- package/vscode/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.js +114 -88
- package/vscode/src/vs/workbench/contrib/testing/browser/testing.contribution.js +99 -67
- package/vscode/src/vs/workbench/contrib/testing/browser/testingConfigurationUi.js +40 -21
- package/vscode/src/vs/workbench/contrib/testing/browser/testingDecorations.js +462 -297
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +110 -89
- package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +448 -313
- package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +280 -161
- package/vscode/src/vs/workbench/contrib/testing/browser/testingProgressUiService.js +6 -9
- package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.js +19 -17
- package/vscode/src/vs/workbench/contrib/testing/browser/theme.js +97 -85
- package/vscode/src/vs/workbench/contrib/testing/common/configuration.js +113 -117
- package/vscode/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.js +20 -8
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/storedValue.js +2 -4
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +32 -19
- package/vscode/src/vs/workbench/contrib/testing/common/testExclusions.js +4 -7
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +30 -31
- package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +23 -23
- package/vscode/src/vs/workbench/contrib/testing/common/testResultService.js +30 -24
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +63 -35
- package/vscode/src/vs/workbench/contrib/testing/common/testService.js +20 -20
- package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +84 -51
- package/vscode/src/vs/workbench/contrib/testing/common/testingChatAgentTool.js +130 -110
- package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.js +27 -23
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +161 -183
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +42 -27
- package/vscode/src/vs/workbench/contrib/testing/common/testingProgressMessages.js +25 -21
- package/vscode/src/vs/workbench/contrib/testing/common/testingUri.js +66 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-testing-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - testing service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-terminal-service-override": "
|
|
20
|
-
"@codingame/monaco-vscode-xterm-addons-common": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-terminal-service-override": "26.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-xterm-addons-common": "26.0.0"
|
|
21
21
|
},
|
|
22
22
|
"main": "index.js",
|
|
23
23
|
"module": "index.js",
|
|
@@ -56,14 +56,14 @@ class SkippedCallFrames {
|
|
|
56
56
|
}
|
|
57
57
|
class CustomStackFrame {
|
|
58
58
|
constructor() {
|
|
59
|
-
this.showHeader = observableValue(
|
|
59
|
+
this.showHeader = observableValue("CustomStackFrame.showHeader", true);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
class WrappedCallStackFrame extends CallStackFrame {
|
|
63
63
|
constructor(original) {
|
|
64
64
|
super(original.name, original.source, original.line, original.column);
|
|
65
|
-
this.editorHeight = observableValue(
|
|
66
|
-
this.collapsed = observableValue(
|
|
65
|
+
this.editorHeight = observableValue("WrappedCallStackFrame.height", this.source ? 100 : 0);
|
|
66
|
+
this.collapsed = observableValue("WrappedCallStackFrame.collapsed", false);
|
|
67
67
|
this.height = derived(reader => {
|
|
68
68
|
return this.collapsed.read(reader) ? CALL_STACK_WIDGET_HEADER_HEIGHT : CALL_STACK_WIDGET_HEADER_HEIGHT + this.editorHeight.read(reader);
|
|
69
69
|
});
|
|
@@ -72,15 +72,15 @@ class WrappedCallStackFrame extends CallStackFrame {
|
|
|
72
72
|
class WrappedCustomStackFrame {
|
|
73
73
|
constructor(original) {
|
|
74
74
|
this.original = original;
|
|
75
|
-
this.collapsed = observableValue(
|
|
75
|
+
this.collapsed = observableValue("WrappedCallStackFrame.collapsed", false);
|
|
76
76
|
this.height = derived(reader => {
|
|
77
77
|
const headerHeight = this.original.showHeader.read(reader) ? CALL_STACK_WIDGET_HEADER_HEIGHT : 0;
|
|
78
78
|
return this.collapsed.read(reader) ? headerHeight : headerHeight + this.original.height.read(reader);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
const isFrameLike =
|
|
83
|
-
const WIDGET_CLASS_NAME =
|
|
82
|
+
const isFrameLike = item => item instanceof WrappedCallStackFrame || item instanceof WrappedCustomStackFrame;
|
|
83
|
+
const WIDGET_CLASS_NAME = "multiCallStackWidget";
|
|
84
84
|
let CallStackWidget = class CallStackWidget extends Disposable {
|
|
85
85
|
get onDidChangeContentHeight() {
|
|
86
86
|
return this.list.onDidChangeContentHeight;
|
|
@@ -97,19 +97,21 @@ let CallStackWidget = class CallStackWidget extends Disposable {
|
|
|
97
97
|
this.currentFramesDs = this._register(( new DisposableStore()));
|
|
98
98
|
container.classList.add(WIDGET_CLASS_NAME);
|
|
99
99
|
this._register(toDisposable(() => container.classList.remove(WIDGET_CLASS_NAME)));
|
|
100
|
-
this.list = this._register(
|
|
101
|
-
instantiationService.createInstance(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
this.list = this._register(
|
|
101
|
+
instantiationService.createInstance(WorkbenchList, "TestResultStackWidget", container, ( new StackDelegate()), [
|
|
102
|
+
instantiationService.createInstance(FrameCodeRenderer, containingEditor, this.layoutEmitter.event),
|
|
103
|
+
instantiationService.createInstance(MissingCodeRenderer),
|
|
104
|
+
instantiationService.createInstance(CustomRenderer),
|
|
105
|
+
instantiationService.createInstance(SkippedRenderer, i => this.loadFrame(i))
|
|
106
|
+
], {
|
|
107
|
+
multipleSelectionSupport: false,
|
|
108
|
+
mouseSupport: false,
|
|
109
|
+
keyboardSupport: false,
|
|
110
|
+
setRowLineHeight: false,
|
|
111
|
+
alwaysConsumeMouseWheel: false,
|
|
112
|
+
accessibilityProvider: instantiationService.createInstance(StackAccessibilityProvider)
|
|
113
|
+
})
|
|
114
|
+
);
|
|
113
115
|
}
|
|
114
116
|
setFrames(frames) {
|
|
115
117
|
this.currentFramesDs.clear();
|
|
@@ -150,8 +152,7 @@ let CallStackWidget = class CallStackWidget extends Disposable {
|
|
|
150
152
|
result.push(frame);
|
|
151
153
|
continue;
|
|
152
154
|
}
|
|
153
|
-
const wrapped = frame instanceof CustomStackFrame
|
|
154
|
-
? ( new WrappedCustomStackFrame(frame)) : ( new WrappedCallStackFrame(frame));
|
|
155
|
+
const wrapped = frame instanceof CustomStackFrame ? ( new WrappedCustomStackFrame(frame)) : ( new WrappedCallStackFrame(frame));
|
|
155
156
|
result.push(wrapped);
|
|
156
157
|
this.currentFramesDs.add(autorun(reader => {
|
|
157
158
|
const height = wrapped.height.read(reader);
|
|
@@ -164,9 +165,7 @@ let CallStackWidget = class CallStackWidget extends Disposable {
|
|
|
164
165
|
return result;
|
|
165
166
|
}
|
|
166
167
|
};
|
|
167
|
-
CallStackWidget = ( __decorate([
|
|
168
|
-
( __param(2, IInstantiationService))
|
|
169
|
-
], CallStackWidget));
|
|
168
|
+
CallStackWidget = ( __decorate([( __param(2, IInstantiationService))], CallStackWidget));
|
|
170
169
|
let StackAccessibilityProvider = class StackAccessibilityProvider {
|
|
171
170
|
constructor(labelService) {
|
|
172
171
|
this.labelService = labelService;
|
|
@@ -181,11 +180,13 @@ let StackAccessibilityProvider = class StackAccessibilityProvider {
|
|
|
181
180
|
if (e instanceof CallStackFrame) {
|
|
182
181
|
if (e.source && e.line) {
|
|
183
182
|
return localize(
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
6893,
|
|
184
|
+
"{0}, line {1} in {2}",
|
|
186
185
|
e.name,
|
|
187
186
|
e.line,
|
|
188
|
-
this.labelService.getUriLabel(e.source, {
|
|
187
|
+
this.labelService.getUriLabel(e.source, {
|
|
188
|
+
relative: true
|
|
189
|
+
})
|
|
189
190
|
);
|
|
190
191
|
}
|
|
191
192
|
return e.name;
|
|
@@ -193,12 +194,10 @@ let StackAccessibilityProvider = class StackAccessibilityProvider {
|
|
|
193
194
|
assertNever();
|
|
194
195
|
}
|
|
195
196
|
getWidgetAriaLabel() {
|
|
196
|
-
return localize(
|
|
197
|
+
return localize(6894, "Stack Trace");
|
|
197
198
|
}
|
|
198
199
|
};
|
|
199
|
-
StackAccessibilityProvider = ( __decorate([
|
|
200
|
-
( __param(0, ILabelService))
|
|
201
|
-
], StackAccessibilityProvider));
|
|
200
|
+
StackAccessibilityProvider = ( __decorate([( __param(0, ILabelService))], StackAccessibilityProvider));
|
|
202
201
|
class StackDelegate {
|
|
203
202
|
getHeight(element) {
|
|
204
203
|
if (element instanceof CallStackFrame || element instanceof WrappedCustomStackFrame) {
|
|
@@ -225,29 +224,28 @@ class StackDelegate {
|
|
|
225
224
|
const editorOptions = {
|
|
226
225
|
scrollBeyondLastLine: false,
|
|
227
226
|
scrollbar: {
|
|
228
|
-
vertical:
|
|
229
|
-
horizontal:
|
|
227
|
+
vertical: "hidden",
|
|
228
|
+
horizontal: "hidden",
|
|
230
229
|
handleMouseWheel: false,
|
|
231
|
-
useShadows: false
|
|
230
|
+
useShadows: false
|
|
232
231
|
},
|
|
233
232
|
overviewRulerLanes: 0,
|
|
234
233
|
fixedOverflowWidgets: true,
|
|
235
234
|
overviewRulerBorder: false,
|
|
236
|
-
stickyScroll: {
|
|
237
|
-
|
|
235
|
+
stickyScroll: {
|
|
236
|
+
enabled: false
|
|
237
|
+
},
|
|
238
|
+
minimap: {
|
|
239
|
+
enabled: false
|
|
240
|
+
},
|
|
238
241
|
readOnly: true,
|
|
239
|
-
automaticLayout: false
|
|
242
|
+
automaticLayout: false
|
|
240
243
|
};
|
|
241
|
-
const makeFrameElements = () => h(
|
|
242
|
-
h(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
]),
|
|
247
|
-
h('div.editorParent', [
|
|
248
|
-
h('div.editorContainer@editor'),
|
|
249
|
-
])
|
|
250
|
-
]);
|
|
244
|
+
const makeFrameElements = () => h("div.multiCallStackFrame", [h("div.header@header", [
|
|
245
|
+
h("div.collapse-button@collapseButton"),
|
|
246
|
+
h("div.title.show-file-icons@title"),
|
|
247
|
+
h("div.actions@actions")
|
|
248
|
+
]), h("div.editorParent", [h("div.editorContainer@editor")])]);
|
|
251
249
|
const CALL_STACK_WIDGET_HEADER_HEIGHT = 24;
|
|
252
250
|
let AbstractFrameRenderer = class AbstractFrameRenderer {
|
|
253
251
|
constructor(instantiationService) {
|
|
@@ -257,17 +255,19 @@ let AbstractFrameRenderer = class AbstractFrameRenderer {
|
|
|
257
255
|
const elements = makeFrameElements();
|
|
258
256
|
container.appendChild(elements.root);
|
|
259
257
|
const templateStore = ( new DisposableStore());
|
|
260
|
-
container.classList.add(
|
|
258
|
+
container.classList.add("multiCallStackFrameContainer");
|
|
261
259
|
templateStore.add(toDisposable(() => {
|
|
262
|
-
container.classList.remove(
|
|
260
|
+
container.classList.remove("multiCallStackFrameContainer");
|
|
263
261
|
elements.root.remove();
|
|
264
262
|
}));
|
|
265
|
-
const label = templateStore.add(
|
|
263
|
+
const label = templateStore.add(
|
|
264
|
+
this.instantiationService.createInstance(ResourceLabel, elements.title, {})
|
|
265
|
+
);
|
|
266
266
|
const collapse = templateStore.add(( new Button(elements.collapseButton, {})));
|
|
267
267
|
const contentId = generateUuid();
|
|
268
268
|
elements.editor.id = contentId;
|
|
269
|
-
elements.editor.role =
|
|
270
|
-
elements.collapseButton.setAttribute(
|
|
269
|
+
elements.editor.role = "region";
|
|
270
|
+
elements.collapseButton.setAttribute("aria-controls", contentId);
|
|
271
271
|
return this.finishRenderTemplate({
|
|
272
272
|
container,
|
|
273
273
|
decorations: [],
|
|
@@ -275,26 +275,35 @@ let AbstractFrameRenderer = class AbstractFrameRenderer {
|
|
|
275
275
|
label,
|
|
276
276
|
collapse,
|
|
277
277
|
elementStore: templateStore.add(( new DisposableStore())),
|
|
278
|
-
templateStore
|
|
278
|
+
templateStore
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
renderElement(element, index, template) {
|
|
282
|
-
const {
|
|
282
|
+
const {
|
|
283
|
+
elementStore
|
|
284
|
+
} = template;
|
|
283
285
|
elementStore.clear();
|
|
284
286
|
const item = element;
|
|
285
287
|
this.setupCollapseButton(item, template);
|
|
286
288
|
}
|
|
287
|
-
setupCollapseButton(
|
|
289
|
+
setupCollapseButton(
|
|
290
|
+
item,
|
|
291
|
+
{
|
|
292
|
+
elementStore,
|
|
293
|
+
elements,
|
|
294
|
+
collapse
|
|
295
|
+
}
|
|
296
|
+
) {
|
|
288
297
|
elementStore.add(autorun(reader => {
|
|
289
|
-
collapse.element.className =
|
|
298
|
+
collapse.element.className = "";
|
|
290
299
|
const collapsed = item.collapsed.read(reader);
|
|
291
300
|
collapse.icon = collapsed ? Codicon.chevronRight : Codicon.chevronDown;
|
|
292
301
|
collapse.element.ariaExpanded = String(!collapsed);
|
|
293
|
-
elements.root.classList.toggle(
|
|
302
|
+
elements.root.classList.toggle("collapsed", collapsed);
|
|
294
303
|
}));
|
|
295
304
|
const toggleCollapse = () => item.collapsed.set(!item.collapsed.get(), undefined);
|
|
296
305
|
elementStore.add(collapse.onDidClick(toggleCollapse));
|
|
297
|
-
elementStore.add(addDisposableListener(elements.title,
|
|
306
|
+
elementStore.add(addDisposableListener(elements.title, "click", toggleCollapse));
|
|
298
307
|
}
|
|
299
308
|
disposeElement(element, index, templateData) {
|
|
300
309
|
templateData.elementStore.clear();
|
|
@@ -303,13 +312,15 @@ let AbstractFrameRenderer = class AbstractFrameRenderer {
|
|
|
303
312
|
templateData.templateStore.dispose();
|
|
304
313
|
}
|
|
305
314
|
};
|
|
306
|
-
AbstractFrameRenderer = ( __decorate([
|
|
307
|
-
( __param(0, IInstantiationService))
|
|
308
|
-
], AbstractFrameRenderer));
|
|
315
|
+
AbstractFrameRenderer = ( __decorate([( __param(0, IInstantiationService))], AbstractFrameRenderer));
|
|
309
316
|
const CONTEXT_LINES = 2;
|
|
310
317
|
let FrameCodeRenderer = class FrameCodeRenderer extends AbstractFrameRenderer {
|
|
311
|
-
static {
|
|
312
|
-
|
|
318
|
+
static {
|
|
319
|
+
FrameCodeRenderer_1 = this;
|
|
320
|
+
}
|
|
321
|
+
static {
|
|
322
|
+
this.templateId = "f";
|
|
323
|
+
}
|
|
313
324
|
constructor(containingEditor, onLayout, modelService, instantiationService) {
|
|
314
325
|
super(instantiationService);
|
|
315
326
|
this.containingEditor = containingEditor;
|
|
@@ -319,23 +330,41 @@ let FrameCodeRenderer = class FrameCodeRenderer extends AbstractFrameRenderer {
|
|
|
319
330
|
}
|
|
320
331
|
finishRenderTemplate(data) {
|
|
321
332
|
const contributions = [{
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const editor = this.containingEditor
|
|
327
|
-
|
|
328
|
-
|
|
333
|
+
id: ClickToLocationContribution.ID,
|
|
334
|
+
instantiation: EditorContributionInstantiation.BeforeFirstInteraction,
|
|
335
|
+
ctor: ClickToLocationContribution
|
|
336
|
+
}];
|
|
337
|
+
const editor = this.containingEditor ? this.instantiationService.createInstance(EmbeddedCodeEditorWidget, data.elements.editor, editorOptions, {
|
|
338
|
+
isSimpleWidget: true,
|
|
339
|
+
contributions
|
|
340
|
+
}, this.containingEditor) : this.instantiationService.createInstance(CodeEditorWidget, data.elements.editor, editorOptions, {
|
|
341
|
+
isSimpleWidget: true,
|
|
342
|
+
contributions
|
|
343
|
+
});
|
|
329
344
|
data.templateStore.add(editor);
|
|
330
|
-
const toolbar = data.templateStore.add(this.instantiationService.createInstance(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
345
|
+
const toolbar = data.templateStore.add(this.instantiationService.createInstance(
|
|
346
|
+
MenuWorkbenchToolBar,
|
|
347
|
+
data.elements.actions,
|
|
348
|
+
MenuId.DebugCallStackToolbar,
|
|
349
|
+
{
|
|
350
|
+
menuOptions: {
|
|
351
|
+
shouldForwardArgs: true
|
|
352
|
+
},
|
|
353
|
+
actionViewItemProvider: (action, options) => createActionViewItem(this.instantiationService, action, options)
|
|
354
|
+
}
|
|
355
|
+
));
|
|
356
|
+
return {
|
|
357
|
+
...data,
|
|
358
|
+
editor,
|
|
359
|
+
toolbar
|
|
360
|
+
};
|
|
335
361
|
}
|
|
336
362
|
renderElement(element, index, template) {
|
|
337
363
|
super.renderElement(element, index, template);
|
|
338
|
-
const {
|
|
364
|
+
const {
|
|
365
|
+
elementStore,
|
|
366
|
+
editor
|
|
367
|
+
} = template;
|
|
339
368
|
const item = element;
|
|
340
369
|
const uri = item.source;
|
|
341
370
|
template.label.element.setFile(uri);
|
|
@@ -351,13 +380,26 @@ let FrameCodeRenderer = class FrameCodeRenderer extends AbstractFrameRenderer {
|
|
|
351
380
|
this.setupEditorLayout(item, template);
|
|
352
381
|
});
|
|
353
382
|
}
|
|
354
|
-
setupEditorLayout(
|
|
383
|
+
setupEditorLayout(
|
|
384
|
+
item,
|
|
385
|
+
{
|
|
386
|
+
elementStore,
|
|
387
|
+
container,
|
|
388
|
+
editor
|
|
389
|
+
}
|
|
390
|
+
) {
|
|
355
391
|
const layout = () => {
|
|
356
392
|
const prev = editor.getContentHeight();
|
|
357
|
-
editor.layout({
|
|
393
|
+
editor.layout({
|
|
394
|
+
width: container.clientWidth,
|
|
395
|
+
height: prev
|
|
396
|
+
});
|
|
358
397
|
const next = editor.getContentHeight();
|
|
359
398
|
if (next !== prev) {
|
|
360
|
-
editor.layout({
|
|
399
|
+
editor.layout({
|
|
400
|
+
width: container.clientWidth,
|
|
401
|
+
height: next
|
|
402
|
+
});
|
|
361
403
|
}
|
|
362
404
|
item.editorHeight.set(next, undefined);
|
|
363
405
|
};
|
|
@@ -370,13 +412,25 @@ let FrameCodeRenderer = class FrameCodeRenderer extends AbstractFrameRenderer {
|
|
|
370
412
|
setupEditorAfterModel(item, template) {
|
|
371
413
|
const range = Range.fromPositions({
|
|
372
414
|
column: item.column ?? 1,
|
|
373
|
-
lineNumber: item.line ?? 1
|
|
415
|
+
lineNumber: item.line ?? 1
|
|
374
416
|
});
|
|
375
|
-
template.toolbar.context = {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
417
|
+
template.toolbar.context = {
|
|
418
|
+
uri: item.source,
|
|
419
|
+
range
|
|
420
|
+
};
|
|
421
|
+
template.editor.setHiddenAreas([Range.fromPositions({
|
|
422
|
+
column: 1,
|
|
423
|
+
lineNumber: 1
|
|
424
|
+
}, {
|
|
425
|
+
column: 1,
|
|
426
|
+
lineNumber: Math.max(1, item.line - CONTEXT_LINES - 1)
|
|
427
|
+
}), Range.fromPositions({
|
|
428
|
+
column: 1,
|
|
429
|
+
lineNumber: item.line + CONTEXT_LINES + 1
|
|
430
|
+
}, {
|
|
431
|
+
column: 1,
|
|
432
|
+
lineNumber: Constants.MAX_SAFE_SMALL_INTEGER
|
|
433
|
+
})]);
|
|
380
434
|
template.editor.changeDecorations(accessor => {
|
|
381
435
|
for (const d of template.decorations) {
|
|
382
436
|
accessor.removeDecoration(d);
|
|
@@ -385,38 +439,49 @@ let FrameCodeRenderer = class FrameCodeRenderer extends AbstractFrameRenderer {
|
|
|
385
439
|
const beforeRange = range.setStartPosition(range.startLineNumber, 1);
|
|
386
440
|
const hasCharactersBefore = !!template.editor.getModel()?.getValueInRange(beforeRange).trim();
|
|
387
441
|
const decoRange = range.setEndPosition(range.startLineNumber, Constants.MAX_SAFE_SMALL_INTEGER);
|
|
388
|
-
template.decorations.push(
|
|
442
|
+
template.decorations.push(
|
|
443
|
+
accessor.addDecoration(decoRange, makeStackFrameColumnDecoration(!hasCharactersBefore))
|
|
444
|
+
);
|
|
389
445
|
template.decorations.push(accessor.addDecoration(decoRange, TOP_STACK_FRAME_DECORATION));
|
|
390
446
|
});
|
|
391
447
|
item.editorHeight.set(template.editor.getContentHeight(), undefined);
|
|
392
448
|
}
|
|
393
449
|
};
|
|
394
|
-
FrameCodeRenderer = FrameCodeRenderer_1 = ( __decorate([
|
|
395
|
-
( __param(2, ITextModelService)),
|
|
396
|
-
( __param(3, IInstantiationService))
|
|
397
|
-
], FrameCodeRenderer));
|
|
450
|
+
FrameCodeRenderer = FrameCodeRenderer_1 = ( __decorate([( __param(2, ITextModelService)), ( __param(3, IInstantiationService))], FrameCodeRenderer));
|
|
398
451
|
let MissingCodeRenderer = class MissingCodeRenderer {
|
|
399
|
-
static {
|
|
400
|
-
|
|
452
|
+
static {
|
|
453
|
+
MissingCodeRenderer_1 = this;
|
|
454
|
+
}
|
|
455
|
+
static {
|
|
456
|
+
this.templateId = "m";
|
|
457
|
+
}
|
|
401
458
|
constructor(instantiationService) {
|
|
402
459
|
this.instantiationService = instantiationService;
|
|
403
460
|
this.templateId = MissingCodeRenderer_1.templateId;
|
|
404
461
|
}
|
|
405
462
|
renderTemplate(container) {
|
|
406
463
|
const elements = makeFrameElements();
|
|
407
|
-
elements.root.classList.add(
|
|
464
|
+
elements.root.classList.add("missing");
|
|
408
465
|
container.appendChild(elements.root);
|
|
409
466
|
const label = this.instantiationService.createInstance(ResourceLabel, elements.title, {});
|
|
410
|
-
return {
|
|
467
|
+
return {
|
|
468
|
+
elements,
|
|
469
|
+
label
|
|
470
|
+
};
|
|
411
471
|
}
|
|
412
472
|
renderElement(element, _index, templateData) {
|
|
413
473
|
const cast = element;
|
|
414
474
|
templateData.label.element.setResource({
|
|
415
475
|
name: cast.name,
|
|
416
|
-
description: ( localize(
|
|
417
|
-
range: {
|
|
476
|
+
description: ( localize(6895, "Line {0} column {1}", cast.line, cast.column)),
|
|
477
|
+
range: {
|
|
478
|
+
startLineNumber: cast.line,
|
|
479
|
+
startColumn: cast.column,
|
|
480
|
+
endColumn: cast.column,
|
|
481
|
+
endLineNumber: cast.line
|
|
482
|
+
}
|
|
418
483
|
}, {
|
|
419
|
-
icon: Codicon.fileBinary
|
|
484
|
+
icon: Codicon.fileBinary
|
|
420
485
|
});
|
|
421
486
|
}
|
|
422
487
|
disposeTemplate(templateData) {
|
|
@@ -424,25 +489,33 @@ let MissingCodeRenderer = class MissingCodeRenderer {
|
|
|
424
489
|
templateData.elements.root.remove();
|
|
425
490
|
}
|
|
426
491
|
};
|
|
427
|
-
MissingCodeRenderer = MissingCodeRenderer_1 = ( __decorate([
|
|
428
|
-
( __param(0, IInstantiationService))
|
|
429
|
-
], MissingCodeRenderer));
|
|
492
|
+
MissingCodeRenderer = MissingCodeRenderer_1 = ( __decorate([( __param(0, IInstantiationService))], MissingCodeRenderer));
|
|
430
493
|
class CustomRenderer extends AbstractFrameRenderer {
|
|
431
494
|
constructor() {
|
|
432
495
|
super(...arguments);
|
|
433
496
|
this.templateId = CustomRenderer.templateId;
|
|
434
497
|
}
|
|
435
|
-
static {
|
|
498
|
+
static {
|
|
499
|
+
this.templateId = "c";
|
|
500
|
+
}
|
|
436
501
|
finishRenderTemplate(data) {
|
|
437
502
|
return data;
|
|
438
503
|
}
|
|
439
504
|
renderElement(element, index, template) {
|
|
440
505
|
super.renderElement(element, index, template);
|
|
441
506
|
const item = element;
|
|
442
|
-
const {
|
|
443
|
-
|
|
507
|
+
const {
|
|
508
|
+
elementStore,
|
|
509
|
+
container,
|
|
510
|
+
label
|
|
511
|
+
} = template;
|
|
512
|
+
label.element.setResource({
|
|
513
|
+
name: item.original.label
|
|
514
|
+
}, {
|
|
515
|
+
icon: item.original.icon
|
|
516
|
+
});
|
|
444
517
|
elementStore.add(autorun(reader => {
|
|
445
|
-
template.elements.header.style.display = item.original.showHeader.read(reader) ?
|
|
518
|
+
template.elements.header.style.display = item.original.showHeader.read(reader) ? "" : "none";
|
|
446
519
|
}));
|
|
447
520
|
elementStore.add(autorunWithStore((reader, store) => {
|
|
448
521
|
if (!item.collapsed.read(reader)) {
|
|
@@ -456,8 +529,12 @@ class CustomRenderer extends AbstractFrameRenderer {
|
|
|
456
529
|
}
|
|
457
530
|
}
|
|
458
531
|
let SkippedRenderer = class SkippedRenderer {
|
|
459
|
-
static {
|
|
460
|
-
|
|
532
|
+
static {
|
|
533
|
+
SkippedRenderer_1 = this;
|
|
534
|
+
}
|
|
535
|
+
static {
|
|
536
|
+
this.templateId = "s";
|
|
537
|
+
}
|
|
461
538
|
constructor(loadFrames, notificationService) {
|
|
462
539
|
this.loadFrames = loadFrames;
|
|
463
540
|
this.notificationService = notificationService;
|
|
@@ -465,8 +542,14 @@ let SkippedRenderer = class SkippedRenderer {
|
|
|
465
542
|
}
|
|
466
543
|
renderTemplate(container) {
|
|
467
544
|
const store = ( new DisposableStore());
|
|
468
|
-
const button = ( new Button(container, {
|
|
469
|
-
|
|
545
|
+
const button = ( new Button(container, {
|
|
546
|
+
title: "",
|
|
547
|
+
...defaultButtonStyles
|
|
548
|
+
}));
|
|
549
|
+
const data = {
|
|
550
|
+
button,
|
|
551
|
+
store
|
|
552
|
+
};
|
|
470
553
|
store.add(button);
|
|
471
554
|
store.add(button.onDidClick(() => {
|
|
472
555
|
if (!data.current || !button.enabled) {
|
|
@@ -474,7 +557,7 @@ let SkippedRenderer = class SkippedRenderer {
|
|
|
474
557
|
}
|
|
475
558
|
button.enabled = false;
|
|
476
559
|
this.loadFrames(data.current).catch(e => {
|
|
477
|
-
this.notificationService.error(( localize(
|
|
560
|
+
this.notificationService.error(( localize(6896, "Failed to load stack frames: {0}", e.message)));
|
|
478
561
|
});
|
|
479
562
|
}));
|
|
480
563
|
return data;
|
|
@@ -489,21 +572,23 @@ let SkippedRenderer = class SkippedRenderer {
|
|
|
489
572
|
templateData.store.dispose();
|
|
490
573
|
}
|
|
491
574
|
};
|
|
492
|
-
SkippedRenderer = SkippedRenderer_1 = ( __decorate([
|
|
493
|
-
( __param(1, INotificationService))
|
|
494
|
-
], SkippedRenderer));
|
|
575
|
+
SkippedRenderer = SkippedRenderer_1 = ( __decorate([( __param(1, INotificationService))], SkippedRenderer));
|
|
495
576
|
let ClickToLocationContribution = class ClickToLocationContribution extends Disposable {
|
|
496
|
-
static {
|
|
577
|
+
static {
|
|
578
|
+
this.ID = "clickToLocation";
|
|
579
|
+
}
|
|
497
580
|
constructor(editor, editorService) {
|
|
498
581
|
super();
|
|
499
582
|
this.editor = editor;
|
|
500
583
|
this.linkDecorations = editor.createDecorationsCollection();
|
|
501
584
|
this._register(toDisposable(() => this.linkDecorations.clear()));
|
|
502
585
|
const clickLinkGesture = this._register(( new ClickLinkGesture(editor)));
|
|
503
|
-
this._register(
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
586
|
+
this._register(
|
|
587
|
+
clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => {
|
|
588
|
+
this.onMove(mouseEvent);
|
|
589
|
+
})
|
|
590
|
+
);
|
|
591
|
+
this._register(clickLinkGesture.onExecute(e => {
|
|
507
592
|
const model = this.editor.getModel();
|
|
508
593
|
if (!this.current || !model) {
|
|
509
594
|
return;
|
|
@@ -512,8 +597,8 @@ let ClickToLocationContribution = class ClickToLocationContribution extends Disp
|
|
|
512
597
|
resource: model.uri,
|
|
513
598
|
options: {
|
|
514
599
|
selection: Range.fromPositions(( new Position(this.current.line, this.current.word.startColumn))),
|
|
515
|
-
selectionRevealType: TextEditorSelectionRevealType.CenterIfOutsideViewport
|
|
516
|
-
}
|
|
600
|
+
selectionRevealType: TextEditorSelectionRevealType.CenterIfOutsideViewport
|
|
601
|
+
}
|
|
517
602
|
}, e.hasSideBySideModifier ? SIDE_GROUP : undefined);
|
|
518
603
|
}));
|
|
519
604
|
}
|
|
@@ -530,44 +615,51 @@ let ClickToLocationContribution = class ClickToLocationContribution extends Disp
|
|
|
530
615
|
if (prev && prev.startColumn === word.startColumn && prev.endColumn === word.endColumn && prev.word === word.word) {
|
|
531
616
|
return;
|
|
532
617
|
}
|
|
533
|
-
this.current = {
|
|
618
|
+
this.current = {
|
|
619
|
+
word,
|
|
620
|
+
line: position.lineNumber
|
|
621
|
+
};
|
|
534
622
|
this.linkDecorations.set([{
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
623
|
+
range: ( new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn)),
|
|
624
|
+
options: {
|
|
625
|
+
description: "call-stack-go-to-file-link",
|
|
626
|
+
inlineClassName: "call-stack-go-to-file-link"
|
|
627
|
+
}
|
|
628
|
+
}]);
|
|
541
629
|
}
|
|
542
630
|
clear() {
|
|
543
631
|
this.linkDecorations.clear();
|
|
544
632
|
this.current = undefined;
|
|
545
633
|
}
|
|
546
634
|
};
|
|
547
|
-
ClickToLocationContribution = ( __decorate([
|
|
548
|
-
( __param(1, IEditorService))
|
|
549
|
-
], ClickToLocationContribution));
|
|
635
|
+
ClickToLocationContribution = ( __decorate([( __param(1, IEditorService))], ClickToLocationContribution));
|
|
550
636
|
registerAction2(class extends Action2 {
|
|
551
637
|
constructor() {
|
|
552
638
|
super({
|
|
553
|
-
id:
|
|
554
|
-
title: ( localize2(
|
|
639
|
+
id: "callStackWidget.goToFile",
|
|
640
|
+
title: ( localize2(6897, "Open File")),
|
|
555
641
|
icon: Codicon.goToFile,
|
|
556
642
|
menu: {
|
|
557
643
|
id: MenuId.DebugCallStackToolbar,
|
|
558
644
|
order: 22,
|
|
559
|
-
group:
|
|
560
|
-
}
|
|
645
|
+
group: "navigation"
|
|
646
|
+
}
|
|
561
647
|
});
|
|
562
648
|
}
|
|
563
|
-
async run(
|
|
649
|
+
async run(
|
|
650
|
+
accessor,
|
|
651
|
+
{
|
|
652
|
+
uri,
|
|
653
|
+
range
|
|
654
|
+
}
|
|
655
|
+
) {
|
|
564
656
|
const editorService = accessor.get(IEditorService);
|
|
565
657
|
await editorService.openEditor({
|
|
566
658
|
resource: uri,
|
|
567
659
|
options: {
|
|
568
660
|
selection: range,
|
|
569
|
-
selectionRevealType: TextEditorSelectionRevealType.CenterIfOutsideViewport
|
|
570
|
-
}
|
|
661
|
+
selectionRevealType: TextEditorSelectionRevealType.CenterIfOutsideViewport
|
|
662
|
+
}
|
|
571
663
|
});
|
|
572
664
|
}
|
|
573
665
|
});
|