@codingame/monaco-vscode-debug-service-override 4.1.0 → 4.1.2

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.
Files changed (60) hide show
  1. package/debug.js +4 -4
  2. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
  3. package/external/tslib/tslib.es6.js +11 -0
  4. package/override/vs/platform/dialogs/common/dialogs.js +10 -0
  5. package/package.json +2 -2
  6. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +73 -0
  7. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +1026 -0
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +1004 -0
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +347 -0
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +337 -0
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +432 -0
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +1039 -0
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +649 -0
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +64 -0
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +636 -0
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +740 -0
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +408 -0
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +206 -0
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +80 -0
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +169 -0
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +1271 -0
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +1330 -0
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +115 -0
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +77 -0
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +307 -0
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +31 -0
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +387 -0
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +267 -0
  29. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +817 -0
  30. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +131 -0
  31. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +142 -0
  32. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +262 -0
  33. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +669 -0
  34. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +6 -0
  35. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +6 -0
  36. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +6 -0
  37. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +6 -0
  38. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +6 -0
  39. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +6 -0
  40. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +709 -0
  41. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +1002 -0
  42. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +48 -0
  43. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +352 -0
  44. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +129 -0
  45. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +734 -0
  46. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +501 -0
  47. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +162 -0
  48. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +21 -0
  49. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +17 -0
  50. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +110 -0
  51. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +62 -0
  52. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +460 -0
  53. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +166 -0
  54. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +36 -0
  55. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +150 -0
  56. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +289 -0
  57. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +87 -0
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +64 -0
  59. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +311 -0
  60. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +29 -0
@@ -0,0 +1,669 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
+ import { posix, isAbsolute, normalize } from 'vscode/vscode/vs/base/common/path';
4
+ import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
5
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
+ import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
7
+ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
8
+ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
9
+ import { renderViewTree } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
10
+ import { LOADED_SCRIPTS_VIEW_ID, CONTEXT_LOADED_SCRIPTS_ITEM_TYPE, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
11
+ import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
12
+ import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
13
+ import { normalizeDriveLetter, tildify } from 'vscode/vscode/vs/base/common/labels';
14
+ import { isWindows } from 'vscode/vscode/vs/base/common/platform';
15
+ import { URI } from 'vscode/vscode/vs/base/common/uri';
16
+ import { ltrim } from 'vscode/vscode/vs/base/common/strings';
17
+ import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
18
+ import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
19
+ import { FileKind } from 'vscode/vscode/vs/platform/files/common/files';
20
+ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
21
+ import { WorkbenchCompressibleObjectTree } from 'vscode/vscode/vs/platform/list/browser/listService';
22
+ import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
23
+ import { createMatches } from 'vscode/vscode/vs/base/common/filters';
24
+ import { DebugContentProvider } from '../common/debugContentProvider.js';
25
+ import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label';
26
+ import { registerAction2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
27
+ import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
28
+ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
29
+ import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
30
+ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
31
+ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
32
+ import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService';
33
+ import { TreeFindMode } from 'vscode/vscode/vs/base/browser/ui/tree/abstractTree';
34
+
35
+ const NEW_STYLE_COMPRESS = true;
36
+ const URI_SCHEMA_PATTERN = /^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;
37
+ class BaseTreeItem {
38
+ constructor(_parent, _label, isIncompressible = false) {
39
+ this._parent = _parent;
40
+ this._label = _label;
41
+ this.isIncompressible = isIncompressible;
42
+ this._children = ( new Map());
43
+ this._showedMoreThanOne = false;
44
+ }
45
+ updateLabel(label) {
46
+ this._label = label;
47
+ }
48
+ isLeaf() {
49
+ return this._children.size === 0;
50
+ }
51
+ getSession() {
52
+ if (this._parent) {
53
+ return this._parent.getSession();
54
+ }
55
+ return undefined;
56
+ }
57
+ setSource(session, source) {
58
+ this._source = source;
59
+ this._children.clear();
60
+ if (source.raw && source.raw.sources) {
61
+ for (const src of source.raw.sources) {
62
+ if (src.name && src.path) {
63
+ const s = ( new BaseTreeItem(this, src.name));
64
+ this._children.set(src.path, s);
65
+ const ss = session.getSource(src);
66
+ s.setSource(session, ss);
67
+ }
68
+ }
69
+ }
70
+ }
71
+ createIfNeeded(key, factory) {
72
+ let child = this._children.get(key);
73
+ if (!child) {
74
+ child = factory(this, key);
75
+ this._children.set(key, child);
76
+ }
77
+ return child;
78
+ }
79
+ getChild(key) {
80
+ return this._children.get(key);
81
+ }
82
+ remove(key) {
83
+ this._children.delete(key);
84
+ }
85
+ removeFromParent() {
86
+ if (this._parent) {
87
+ this._parent.remove(this._label);
88
+ if (this._parent._children.size === 0) {
89
+ this._parent.removeFromParent();
90
+ }
91
+ }
92
+ }
93
+ getTemplateId() {
94
+ return 'id';
95
+ }
96
+ getId() {
97
+ const parent = this.getParent();
98
+ return parent ? `${parent.getId()}/${this.getInternalId()}` : this.getInternalId();
99
+ }
100
+ getInternalId() {
101
+ return this._label;
102
+ }
103
+ getParent() {
104
+ if (this._parent) {
105
+ if (this._parent.isSkipped()) {
106
+ return this._parent.getParent();
107
+ }
108
+ return this._parent;
109
+ }
110
+ return undefined;
111
+ }
112
+ isSkipped() {
113
+ if (this._parent) {
114
+ if (this._parent.oneChild()) {
115
+ return true;
116
+ }
117
+ return false;
118
+ }
119
+ return true;
120
+ }
121
+ hasChildren() {
122
+ const child = this.oneChild();
123
+ if (child) {
124
+ return child.hasChildren();
125
+ }
126
+ return this._children.size > 0;
127
+ }
128
+ getChildren() {
129
+ const child = this.oneChild();
130
+ if (child) {
131
+ return child.getChildren();
132
+ }
133
+ const array = [];
134
+ for (const child of ( this._children.values())) {
135
+ array.push(child);
136
+ }
137
+ return array.sort((a, b) => this.compare(a, b));
138
+ }
139
+ getLabel(separateRootFolder = true) {
140
+ const child = this.oneChild();
141
+ if (child) {
142
+ const sep = (this instanceof RootFolderTreeItem && separateRootFolder) ? ' • ' : posix.sep;
143
+ return `${this._label}${sep}${child.getLabel()}`;
144
+ }
145
+ return this._label;
146
+ }
147
+ getHoverLabel() {
148
+ if (this._source && this._parent && this._parent._source) {
149
+ return this._source.raw.path || this._source.raw.name;
150
+ }
151
+ const label = this.getLabel(false);
152
+ const parent = this.getParent();
153
+ if (parent) {
154
+ const hover = parent.getHoverLabel();
155
+ if (hover) {
156
+ return `${hover}/${label}`;
157
+ }
158
+ }
159
+ return label;
160
+ }
161
+ getSource() {
162
+ const child = this.oneChild();
163
+ if (child) {
164
+ return child.getSource();
165
+ }
166
+ return this._source;
167
+ }
168
+ compare(a, b) {
169
+ if (a._label && b._label) {
170
+ return a._label.localeCompare(b._label);
171
+ }
172
+ return 0;
173
+ }
174
+ oneChild() {
175
+ if (!this._source && !this._showedMoreThanOne && this.skipOneChild()) {
176
+ if (this._children.size === 1) {
177
+ return ( this._children.values()).next().value;
178
+ }
179
+ if (this._children.size > 1) {
180
+ this._showedMoreThanOne = true;
181
+ }
182
+ }
183
+ return undefined;
184
+ }
185
+ skipOneChild() {
186
+ {
187
+ return this instanceof RootTreeItem;
188
+ }
189
+ }
190
+ }
191
+ class RootFolderTreeItem extends BaseTreeItem {
192
+ constructor(parent, folder) {
193
+ super(parent, folder.name, true);
194
+ this.folder = folder;
195
+ }
196
+ }
197
+ class RootTreeItem extends BaseTreeItem {
198
+ constructor(_pathService, _contextService, _labelService) {
199
+ super(undefined, 'Root');
200
+ this._pathService = _pathService;
201
+ this._contextService = _contextService;
202
+ this._labelService = _labelService;
203
+ }
204
+ add(session) {
205
+ return this.createIfNeeded(session.getId(), () => ( new SessionTreeItem(this._labelService, this, session, this._pathService, this._contextService)));
206
+ }
207
+ find(session) {
208
+ return this.getChild(session.getId());
209
+ }
210
+ }
211
+ class SessionTreeItem extends BaseTreeItem {
212
+ static { this.URL_REGEXP = /^(https?:\/\/[^/]+)(\/.*)$/; }
213
+ constructor(labelService, parent, session, _pathService, rootProvider) {
214
+ super(parent, session.getLabel(), true);
215
+ this._pathService = _pathService;
216
+ this.rootProvider = rootProvider;
217
+ this._map = ( new Map());
218
+ this._labelService = labelService;
219
+ this._session = session;
220
+ }
221
+ getInternalId() {
222
+ return this._session.getId();
223
+ }
224
+ getSession() {
225
+ return this._session;
226
+ }
227
+ getHoverLabel() {
228
+ return undefined;
229
+ }
230
+ hasChildren() {
231
+ return true;
232
+ }
233
+ compare(a, b) {
234
+ const acat = this.category(a);
235
+ const bcat = this.category(b);
236
+ if (acat !== bcat) {
237
+ return acat - bcat;
238
+ }
239
+ return super.compare(a, b);
240
+ }
241
+ category(item) {
242
+ if (item instanceof RootFolderTreeItem) {
243
+ return item.folder.index;
244
+ }
245
+ const l = item.getLabel();
246
+ if (l && /^<.+>$/.test(l)) {
247
+ return 1000;
248
+ }
249
+ return 999;
250
+ }
251
+ async addPath(source) {
252
+ let folder;
253
+ let url;
254
+ let path = source.raw.path;
255
+ if (!path) {
256
+ return;
257
+ }
258
+ if (this._labelService && URI_SCHEMA_PATTERN.test(path)) {
259
+ path = this._labelService.getUriLabel(( URI.parse(path)));
260
+ }
261
+ const match = SessionTreeItem.URL_REGEXP.exec(path);
262
+ if (match && match.length === 3) {
263
+ url = match[1];
264
+ path = decodeURI(match[2]);
265
+ }
266
+ else {
267
+ if (isAbsolute(path)) {
268
+ const resource = URI.file(path);
269
+ folder = this.rootProvider ? this.rootProvider.getWorkspaceFolder(resource) : null;
270
+ if (folder) {
271
+ path = normalize(ltrim(resource.path.substring(folder.uri.path.length), posix.sep));
272
+ const hasMultipleRoots = this.rootProvider.getWorkspace().folders.length > 1;
273
+ if (hasMultipleRoots) {
274
+ path = posix.sep + path;
275
+ }
276
+ else {
277
+ folder = null;
278
+ }
279
+ }
280
+ else {
281
+ path = normalize(path);
282
+ if (isWindows) {
283
+ path = normalizeDriveLetter(path);
284
+ }
285
+ else {
286
+ path = tildify(path, (await this._pathService.userHome()).fsPath);
287
+ }
288
+ }
289
+ }
290
+ }
291
+ let leaf = this;
292
+ path.split(/[\/\\]/).forEach((segment, i) => {
293
+ if (i === 0 && folder) {
294
+ const f = folder;
295
+ leaf = leaf.createIfNeeded(folder.name, parent => ( new RootFolderTreeItem(parent, f)));
296
+ }
297
+ else if (i === 0 && url) {
298
+ leaf = leaf.createIfNeeded(url, parent => ( new BaseTreeItem(parent, url)));
299
+ }
300
+ else {
301
+ leaf = leaf.createIfNeeded(segment, parent => ( new BaseTreeItem(parent, segment)));
302
+ }
303
+ });
304
+ leaf.setSource(this._session, source);
305
+ if (source.raw.path) {
306
+ this._map.set(source.raw.path, leaf);
307
+ }
308
+ }
309
+ removePath(source) {
310
+ if (source.raw.path) {
311
+ const leaf = this._map.get(source.raw.path);
312
+ if (leaf) {
313
+ leaf.removeFromParent();
314
+ return true;
315
+ }
316
+ }
317
+ return false;
318
+ }
319
+ }
320
+ function asTreeElement(item, viewState) {
321
+ const children = item.getChildren();
322
+ const collapsed = viewState ? !( viewState.expanded.has(item.getId())) : !(item instanceof SessionTreeItem);
323
+ return {
324
+ element: item,
325
+ collapsed,
326
+ collapsible: item.hasChildren(),
327
+ children: ( children.map(i => asTreeElement(i, viewState)))
328
+ };
329
+ }
330
+ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
331
+ constructor(options, contextMenuService, keybindingService, instantiationService, viewDescriptorService, configurationService, editorService, contextKeyService, contextService, debugService, labelService, pathService, openerService, themeService, telemetryService) {
332
+ super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
333
+ this.editorService = editorService;
334
+ this.contextService = contextService;
335
+ this.debugService = debugService;
336
+ this.labelService = labelService;
337
+ this.pathService = pathService;
338
+ this.treeNeedsRefreshOnVisible = false;
339
+ this.loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(contextKeyService);
340
+ }
341
+ renderBody(container) {
342
+ super.renderBody(container);
343
+ this.element.classList.add('debug-pane');
344
+ container.classList.add('debug-loaded-scripts');
345
+ container.classList.add('show-file-icons');
346
+ this.treeContainer = renderViewTree(container);
347
+ this.filter = ( new LoadedScriptsFilter());
348
+ const root = ( new RootTreeItem(this.pathService, this.contextService, this.labelService));
349
+ this.treeLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
350
+ this._register(this.treeLabels);
351
+ this.tree = this.instantiationService.createInstance(WorkbenchCompressibleObjectTree, 'LoadedScriptsView', this.treeContainer, ( new LoadedScriptsDelegate()), [( new LoadedScriptsRenderer(this.treeLabels))], {
352
+ compressionEnabled: NEW_STYLE_COMPRESS,
353
+ collapseByDefault: true,
354
+ hideTwistiesOfChildlessElements: true,
355
+ identityProvider: {
356
+ getId: (element) => element.getId()
357
+ },
358
+ keyboardNavigationLabelProvider: {
359
+ getKeyboardNavigationLabel: (element) => {
360
+ return element.getLabel();
361
+ },
362
+ getCompressedNodeKeyboardNavigationLabel: (elements) => {
363
+ return ( elements.map(e => e.getLabel())).join('/');
364
+ }
365
+ },
366
+ filter: this.filter,
367
+ accessibilityProvider: ( new LoadedSciptsAccessibilityProvider()),
368
+ overrideStyles: {
369
+ listBackground: this.getBackgroundColor()
370
+ }
371
+ });
372
+ const updateView = (viewState) => this.tree.setChildren(null, asTreeElement(root, viewState).children);
373
+ updateView();
374
+ this.changeScheduler = ( new RunOnceScheduler(() => {
375
+ this.treeNeedsRefreshOnVisible = false;
376
+ if (this.tree) {
377
+ updateView();
378
+ }
379
+ }, 300));
380
+ this._register(this.changeScheduler);
381
+ this._register(this.tree.onDidOpen(e => {
382
+ if (e.element instanceof BaseTreeItem) {
383
+ const source = e.element.getSource();
384
+ if (source && source.available) {
385
+ const nullRange = { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 };
386
+ source.openInEditor(this.editorService, nullRange, e.editorOptions.preserveFocus, e.sideBySide, e.editorOptions.pinned);
387
+ }
388
+ }
389
+ }));
390
+ this._register(this.tree.onDidChangeFocus(() => {
391
+ const focus = this.tree.getFocus();
392
+ if (focus instanceof SessionTreeItem) {
393
+ this.loadedScriptsItemType.set('session');
394
+ }
395
+ else {
396
+ this.loadedScriptsItemType.reset();
397
+ }
398
+ }));
399
+ const scheduleRefreshOnVisible = () => {
400
+ if (this.isBodyVisible()) {
401
+ this.changeScheduler.schedule();
402
+ }
403
+ else {
404
+ this.treeNeedsRefreshOnVisible = true;
405
+ }
406
+ };
407
+ const addSourcePathsToSession = async (session) => {
408
+ if (session.capabilities.supportsLoadedSourcesRequest) {
409
+ const sessionNode = root.add(session);
410
+ const paths = await session.getLoadedSources();
411
+ for (const path of paths) {
412
+ await sessionNode.addPath(path);
413
+ }
414
+ scheduleRefreshOnVisible();
415
+ }
416
+ };
417
+ const registerSessionListeners = (session) => {
418
+ this._register(session.onDidChangeName(async () => {
419
+ const sessionRoot = root.find(session);
420
+ if (sessionRoot) {
421
+ sessionRoot.updateLabel(session.getLabel());
422
+ scheduleRefreshOnVisible();
423
+ }
424
+ }));
425
+ this._register(session.onDidLoadedSource(async (event) => {
426
+ let sessionRoot;
427
+ switch (event.reason) {
428
+ case 'new':
429
+ case 'changed':
430
+ sessionRoot = root.add(session);
431
+ await sessionRoot.addPath(event.source);
432
+ scheduleRefreshOnVisible();
433
+ if (event.reason === 'changed') {
434
+ DebugContentProvider.refreshDebugContent(event.source.uri);
435
+ }
436
+ break;
437
+ case 'removed':
438
+ sessionRoot = root.find(session);
439
+ if (sessionRoot && sessionRoot.removePath(event.source)) {
440
+ scheduleRefreshOnVisible();
441
+ }
442
+ break;
443
+ default:
444
+ this.filter.setFilter(event.source.name);
445
+ this.tree.refilter();
446
+ break;
447
+ }
448
+ }));
449
+ };
450
+ this._register(this.debugService.onDidNewSession(registerSessionListeners));
451
+ this.debugService.getModel().getSessions().forEach(registerSessionListeners);
452
+ this._register(this.debugService.onDidEndSession(({ session }) => {
453
+ root.remove(session.getId());
454
+ this.changeScheduler.schedule();
455
+ }));
456
+ this.changeScheduler.schedule(0);
457
+ this._register(this.onDidChangeBodyVisibility(visible => {
458
+ if (visible && this.treeNeedsRefreshOnVisible) {
459
+ this.changeScheduler.schedule();
460
+ }
461
+ }));
462
+ let viewState;
463
+ this._register(this.tree.onDidChangeFindPattern(pattern => {
464
+ if (this.tree.findMode === TreeFindMode.Highlight) {
465
+ return;
466
+ }
467
+ if (!viewState && pattern) {
468
+ const expanded = ( new Set());
469
+ const visit = (node) => {
470
+ if (node.element && !node.collapsed) {
471
+ expanded.add(node.element.getId());
472
+ }
473
+ for (const child of node.children) {
474
+ visit(child);
475
+ }
476
+ };
477
+ visit(this.tree.getNode());
478
+ viewState = { expanded };
479
+ this.tree.expandAll();
480
+ }
481
+ else if (!pattern && viewState) {
482
+ this.tree.setFocus([]);
483
+ updateView(viewState);
484
+ viewState = undefined;
485
+ }
486
+ }));
487
+ this.debugService.getModel().getSessions().forEach(session => addSourcePathsToSession(session));
488
+ }
489
+ layoutBody(height, width) {
490
+ super.layoutBody(height, width);
491
+ this.tree.layout(height, width);
492
+ }
493
+ collapseAll() {
494
+ this.tree.collapseAll();
495
+ }
496
+ dispose() {
497
+ dispose(this.tree);
498
+ dispose(this.treeLabels);
499
+ super.dispose();
500
+ }
501
+ };
502
+ LoadedScriptsView = ( __decorate([
503
+ ( __param(1, IContextMenuService)),
504
+ ( __param(2, IKeybindingService)),
505
+ ( __param(3, IInstantiationService)),
506
+ ( __param(4, IViewDescriptorService)),
507
+ ( __param(5, IConfigurationService)),
508
+ ( __param(6, IEditorService)),
509
+ ( __param(7, IContextKeyService)),
510
+ ( __param(8, IWorkspaceContextService)),
511
+ ( __param(9, IDebugService)),
512
+ ( __param(10, ILabelService)),
513
+ ( __param(11, IPathService)),
514
+ ( __param(12, IOpenerService)),
515
+ ( __param(13, IThemeService)),
516
+ ( __param(14, ITelemetryService))
517
+ ], LoadedScriptsView));
518
+ class LoadedScriptsDelegate {
519
+ getHeight(element) {
520
+ return 22;
521
+ }
522
+ getTemplateId(element) {
523
+ return LoadedScriptsRenderer.ID;
524
+ }
525
+ }
526
+ class LoadedScriptsRenderer {
527
+ static { this.ID = 'lsrenderer'; }
528
+ constructor(labels) {
529
+ this.labels = labels;
530
+ }
531
+ get templateId() {
532
+ return LoadedScriptsRenderer.ID;
533
+ }
534
+ renderTemplate(container) {
535
+ const label = this.labels.create(container, { supportHighlights: true });
536
+ return { label };
537
+ }
538
+ renderElement(node, index, data) {
539
+ const element = node.element;
540
+ const label = element.getLabel();
541
+ this.render(element, label, data, node.filterData);
542
+ }
543
+ renderCompressedElements(node, index, data, height) {
544
+ const element = node.element.elements[node.element.elements.length - 1];
545
+ const labels = ( node.element.elements.map(e => e.getLabel()));
546
+ this.render(element, labels, data, node.filterData);
547
+ }
548
+ render(element, labels, data, filterData) {
549
+ const label = {
550
+ name: labels
551
+ };
552
+ const options = {
553
+ title: element.getHoverLabel()
554
+ };
555
+ if (element instanceof RootFolderTreeItem) {
556
+ options.fileKind = FileKind.ROOT_FOLDER;
557
+ }
558
+ else if (element instanceof SessionTreeItem) {
559
+ options.title = ( localizeWithPath(
560
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
561
+ 'loadedScriptsSession',
562
+ "Debug Session"
563
+ ));
564
+ options.hideIcon = true;
565
+ }
566
+ else if (element instanceof BaseTreeItem) {
567
+ const src = element.getSource();
568
+ if (src && src.uri) {
569
+ label.resource = src.uri;
570
+ options.fileKind = FileKind.FILE;
571
+ }
572
+ else {
573
+ options.fileKind = FileKind.FOLDER;
574
+ }
575
+ }
576
+ options.matches = createMatches(filterData);
577
+ data.label.setResource(label, options);
578
+ }
579
+ disposeTemplate(templateData) {
580
+ templateData.label.dispose();
581
+ }
582
+ }
583
+ class LoadedSciptsAccessibilityProvider {
584
+ getWidgetAriaLabel() {
585
+ return ( localizeWithPath(
586
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
587
+ { comment: ['Debug is a noun in this context, not a verb.'], key: 'loadedScriptsAriaLabel' },
588
+ "Debug Loaded Scripts"
589
+ ));
590
+ }
591
+ getAriaLabel(element) {
592
+ if (element instanceof RootFolderTreeItem) {
593
+ return ( localizeWithPath(
594
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
595
+ 'loadedScriptsRootFolderAriaLabel',
596
+ "Workspace folder {0}, loaded script, debug",
597
+ element.getLabel()
598
+ ));
599
+ }
600
+ if (element instanceof SessionTreeItem) {
601
+ return ( localizeWithPath(
602
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
603
+ 'loadedScriptsSessionAriaLabel',
604
+ "Session {0}, loaded script, debug",
605
+ element.getLabel()
606
+ ));
607
+ }
608
+ if (element.hasChildren()) {
609
+ return ( localizeWithPath(
610
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
611
+ 'loadedScriptsFolderAriaLabel',
612
+ "Folder {0}, loaded script, debug",
613
+ element.getLabel()
614
+ ));
615
+ }
616
+ else {
617
+ return ( localizeWithPath(
618
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
619
+ 'loadedScriptsSourceAriaLabel',
620
+ "{0}, loaded script, debug",
621
+ element.getLabel()
622
+ ));
623
+ }
624
+ }
625
+ }
626
+ class LoadedScriptsFilter {
627
+ setFilter(filterText) {
628
+ this.filterText = filterText;
629
+ }
630
+ filter(element, parentVisibility) {
631
+ if (!this.filterText) {
632
+ return 1 ;
633
+ }
634
+ if (element.isLeaf()) {
635
+ const name = element.getLabel();
636
+ if (name.indexOf(this.filterText) >= 0) {
637
+ return 1 ;
638
+ }
639
+ return 0 ;
640
+ }
641
+ return 2 ;
642
+ }
643
+ }
644
+ registerAction2(class Collapse extends ViewAction {
645
+ constructor() {
646
+ super({
647
+ id: 'loadedScripts.collapse',
648
+ viewId: LOADED_SCRIPTS_VIEW_ID,
649
+ title: ( localizeWithPath(
650
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
651
+ 'collapse',
652
+ "Collapse All"
653
+ )),
654
+ f1: false,
655
+ icon: Codicon.collapseAll,
656
+ menu: {
657
+ id: MenuId.ViewTitle,
658
+ order: 30,
659
+ group: 'navigation',
660
+ when: ( ContextKeyExpr.equals('view', LOADED_SCRIPTS_VIEW_ID))
661
+ }
662
+ });
663
+ }
664
+ runInView(_accessor, view) {
665
+ view.collapseAll();
666
+ }
667
+ });
668
+
669
+ export { LoadedScriptsView };
@@ -0,0 +1,6 @@
1
+ import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
+
3
+ var css = ".codicon-debug-hint{cursor:pointer}.codicon-debug-hint:not([class*=codicon-debug-breakpoint]):not([class*=codicon-debug-stackframe]){opacity:.4!important}.inline-breakpoint-widget.codicon{align-items:center;display:flex!important}.inline-breakpoint-widget.codicon-debug-breakpoint-disabled{opacity:.7}.monaco-editor .inline-breakpoint-widget.line-start{left:-8px!important}.monaco-editor .debug-breakpoint-placeholder{display:inline-flex;margin-top:-1px;vertical-align:middle;width:.9em}.codicon-debug-breakpoint-conditional.codicon-debug-stackframe-focused:after,.codicon-debug-breakpoint-conditional.codicon-debug-stackframe:after,.codicon-debug-breakpoint.codicon-debug-stackframe-focused:after,.codicon-debug-breakpoint.codicon-debug-stackframe:after{content:\"\\eb8a\";position:absolute}.monaco-editor .debug-top-stack-frame-column{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;align-items:center;display:inline-flex;font:normal normal normal 16px/1 codicon;margin-left:0;margin-right:4px;margin-top:-1px;text-rendering:auto;vertical-align:middle;width:.9em}.monaco-editor .debug-top-stack-frame-column.start-of-line{margin-top:0;position:absolute;top:50%;transform:translate(-17px,-50%)}.monaco-editor .inline-breakpoint-widget{cursor:pointer}.monaco-workbench .debug-view-content .monaco-list-row .monaco-tl-contents{overflow:hidden;text-overflow:ellipsis}.monaco-workbench .monaco-list-row .expression{display:flex}.monaco-workbench .debug-hover-widget .monaco-list-row .expression,.monaco-workbench .debug-pane .monaco-list-row .expression{font-family:var(--monaco-monospace-font);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:pre}.monaco-workbench.mac .debug-hover-widget .monaco-list-row .expression,.monaco-workbench.mac .debug-pane .monaco-list-row .expression{font-size:11px}.monaco-workbench .monaco-list-row .expression .value{margin-left:6px}.monaco-workbench .monaco-list-row .expression .lazy-button{align-self:center;border-radius:5px;display:none;margin-left:3px}.monaco-workbench .monaco-list-row .expression.lazy .lazy-button{display:inline}.monaco-workbench .monaco-list-row .expression .value a.link:hover{text-decoration:underline}.monaco-workbench .monaco-list-row .expression .value a.link.pointer{cursor:pointer}.monaco-workbench .monaco-list:focus .monaco-list-row.selected .expression .name,.monaco-workbench .monaco-list:focus .monaco-list-row.selected .expression .value{color:inherit}.monaco-workbench .monaco-list-row .expression .name.internal,.monaco-workbench .monaco-list-row .expression .name.virtual{opacity:.5}.monaco-workbench .monaco-list-row .expression .unavailable{font-style:italic}.monaco-workbench .debug-inline-value{background-color:var(--vscode-editor-inlineValuesBackground);color:var(--vscode-editor-inlineValuesForeground)}";
4
+ n(css,{});
5
+
6
+ export { css, css as default };
@@ -0,0 +1,6 @@
1
+ import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
+
3
+ var css = ".monaco-editor .debug-hover-widget{animation-duration:.15s;animation-name:fadeIn;position:absolute;user-select:text;-webkit-user-select:text;white-space:pre;word-break:break-all;z-index:50}.monaco-editor .debug-hover-widget .complex-value{max-width:550px}.monaco-editor .debug-hover-widget .complex-value .tip,.monaco-editor .debug-hover-widget .complex-value .title{font-size:11px;height:18px;line-height:18px;overflow:hidden;padding-left:15px;padding-right:2px;text-overflow:ellipsis;white-space:pre;word-break:normal}.monaco-editor .debug-hover-widget .complex-value .title{border-bottom:1px solid hsla(0,0%,50%,.35)}.monaco-editor .debug-hover-widget .complex-value .tip{border-top:1px solid hsla(0,0%,50%,.35);opacity:.5}.monaco-editor .debug-hover-widget .debug-hover-tree{cursor:pointer;line-height:18px}.monaco-editor .debug-hover-widget .debug-hover-tree .monaco-list-row .monaco-tl-contents{user-select:text;-webkit-user-select:text;white-space:pre}.monaco-editor .debug-hover-widget .debug-hover-tree .monaco-list-rows .monaco-list-row:hover:not(.highlighted):not(.selected):not(.focused){background-color:inherit}.monaco-editor .debug-hover-widget pre{margin-bottom:0;margin-top:0}.monaco-editor .debugHoverHighlight{background-color:rgba(173,214,255,.15)}.monaco-editor .debug-hover-widget>.monaco-scrollable-element>.value{color:hsla(0,0%,42%,.8);font-family:var(--monaco-monospace-font);max-height:500px;overflow:auto;padding:4px 5px;white-space:pre-wrap}.monaco-editor.hc-theme .debugHoverHighlight,.monaco-editor.vs-dark .debugHoverHighlight{background-color:rgba(38,79,120,.25)}";
4
+ n(css,{});
5
+
6
+ export { css, css as default };