@codingame/monaco-vscode-debug-service-override 3.2.3 → 4.1.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.
Files changed (60) hide show
  1. package/debug.js +4 -4
  2. package/package.json +2 -2
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
  4. package/external/tslib/tslib.es6.js +0 -11
  5. package/override/vs/platform/dialogs/common/dialogs.js +0 -8
  6. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +0 -73
  7. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +0 -1011
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +0 -970
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +0 -324
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +0 -432
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -1039
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +0 -649
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +0 -64
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +0 -636
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +0 -725
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +0 -398
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +0 -206
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +0 -80
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +0 -169
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +0 -1271
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +0 -1305
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -115
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +0 -77
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +0 -307
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +0 -31
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +0 -378
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +0 -267
  29. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +0 -808
  30. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +0 -121
  31. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +0 -141
  32. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +0 -262
  33. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +0 -669
  34. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +0 -6
  35. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +0 -6
  36. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +0 -6
  37. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +0 -6
  38. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +0 -6
  39. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +0 -6
  40. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +0 -709
  41. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +0 -992
  42. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +0 -48
  43. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +0 -348
  44. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +0 -119
  45. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +0 -763
  46. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +0 -501
  47. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +0 -162
  48. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +0 -21
  49. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +0 -17
  50. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +0 -110
  51. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +0 -62
  52. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +0 -460
  53. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +0 -162
  54. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +0 -36
  55. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +0 -148
  56. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +0 -289
  57. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -87
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +0 -64
  59. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +0 -311
  60. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +0 -28
@@ -1,48 +0,0 @@
1
- import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
2
- import { splitGlobAware } from 'vscode/vscode/vs/base/common/glob';
3
- import { ReplEvaluationInput, ReplEvaluationResult } from 'vscode/vscode/vs/workbench/contrib/debug/common/replModel';
4
- import { Variable } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
5
-
6
- class ReplFilter {
7
- constructor() {
8
- this._parsedQueries = [];
9
- }
10
- static { this.matchQuery = matchesFuzzy; }
11
- set filterQuery(query) {
12
- this._parsedQueries = [];
13
- query = query.trim();
14
- if (query && query !== '') {
15
- const filters = ( splitGlobAware(query, ',').map(s => s.trim())).filter(s => !!s.length);
16
- for (const f of filters) {
17
- if (f.startsWith('!')) {
18
- this._parsedQueries.push({ type: 'exclude', query: f.slice(1) });
19
- }
20
- else {
21
- this._parsedQueries.push({ type: 'include', query: f });
22
- }
23
- }
24
- }
25
- }
26
- filter(element, parentVisibility) {
27
- if (element instanceof ReplEvaluationInput || element instanceof ReplEvaluationResult || element instanceof Variable) {
28
- return 1 ;
29
- }
30
- let includeQueryPresent = false;
31
- let includeQueryMatched = false;
32
- const text = ( element.toString(true));
33
- for (const { type, query } of this._parsedQueries) {
34
- if (type === 'exclude' && ReplFilter.matchQuery(query, text)) {
35
- return false;
36
- }
37
- else if (type === 'include') {
38
- includeQueryPresent = true;
39
- if (ReplFilter.matchQuery(query, text)) {
40
- includeQueryMatched = true;
41
- }
42
- }
43
- }
44
- return includeQueryPresent ? includeQueryMatched : ((typeof parentVisibility !== 'undefined' ? parentVisibility : 1) );
45
- }
46
- }
47
-
48
- export { ReplFilter };
@@ -1,348 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { append, clearNode, addDisposableListener, $ as $$1 } from 'vscode/vscode/vs/base/browser/dom';
3
- import { CountBadge } from 'vscode/vscode/vs/base/browser/ui/countBadge/countBadge';
4
- import { HighlightedLabel } from 'vscode/vscode/vs/base/browser/ui/highlightedlabel/highlightedLabel';
5
- import { CachedListVirtualDelegate } from 'vscode/vscode/vs/base/browser/ui/list/list';
6
- import { createMatches } from 'vscode/vscode/vs/base/common/filters';
7
- import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
8
- import { basename } from 'vscode/vscode/vs/base/common/path';
9
- import Severity from 'vscode/vscode/vs/base/common/severity';
10
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
11
- import { IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
12
- import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label';
13
- import { defaultCountBadgeStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
14
- import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
15
- import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
16
- import { AbstractExpressionsRenderer, renderExpressionValue, renderVariable } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
17
- import { handleANSIOutput } from './debugANSIHandling.js';
18
- import { debugConsoleEvaluationInput } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
19
- import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
20
- import { Variable } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
21
- import { ReplVariableElement, ReplEvaluationResult, ReplOutputElement, ReplEvaluationInput, ReplGroup, RawObjectReplElement } from 'vscode/vscode/vs/workbench/contrib/debug/common/replModel';
22
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
23
-
24
- var ReplGroupRenderer_1, ReplOutputElementRenderer_1, ReplVariablesRenderer_1;
25
- const $ = $$1;
26
- class ReplEvaluationInputsRenderer {
27
- static { this.ID = 'replEvaluationInput'; }
28
- get templateId() {
29
- return ReplEvaluationInputsRenderer.ID;
30
- }
31
- renderTemplate(container) {
32
- append(container, $('span.arrow' + ThemeIcon.asCSSSelector(debugConsoleEvaluationInput)));
33
- const input = append(container, $('.expression'));
34
- const label = ( new HighlightedLabel(input));
35
- return { label };
36
- }
37
- renderElement(element, index, templateData) {
38
- const evaluation = element.element;
39
- templateData.label.set(evaluation.value, createMatches(element.filterData));
40
- }
41
- disposeTemplate(templateData) {
42
- }
43
- }
44
- let ReplGroupRenderer = class ReplGroupRenderer {
45
- static { ReplGroupRenderer_1 = this; }
46
- static { this.ID = 'replGroup'; }
47
- constructor(linkDetector, themeService) {
48
- this.linkDetector = linkDetector;
49
- this.themeService = themeService;
50
- }
51
- get templateId() {
52
- return ReplGroupRenderer_1.ID;
53
- }
54
- renderTemplate(container) {
55
- const label = append(container, $('.expression'));
56
- return { label };
57
- }
58
- renderElement(element, _index, templateData) {
59
- const replGroup = element.element;
60
- clearNode(templateData.label);
61
- const result = handleANSIOutput(replGroup.name, this.linkDetector, this.themeService, undefined);
62
- templateData.label.appendChild(result);
63
- }
64
- disposeTemplate(_templateData) {
65
- }
66
- };
67
- ReplGroupRenderer = ReplGroupRenderer_1 = ( __decorate([
68
- ( __param(1, IThemeService))
69
- ], ReplGroupRenderer));
70
- class ReplEvaluationResultsRenderer {
71
- static { this.ID = 'replEvaluationResult'; }
72
- get templateId() {
73
- return ReplEvaluationResultsRenderer.ID;
74
- }
75
- constructor(linkDetector) {
76
- this.linkDetector = linkDetector;
77
- }
78
- renderTemplate(container) {
79
- const output = append(container, $('.evaluation-result.expression'));
80
- const value = append(output, $('span.value'));
81
- return { value };
82
- }
83
- renderElement(element, index, templateData) {
84
- const expression = element.element;
85
- renderExpressionValue(expression, templateData.value, {
86
- showHover: false,
87
- colorize: true,
88
- linkDetector: this.linkDetector
89
- });
90
- }
91
- disposeTemplate(templateData) {
92
- }
93
- }
94
- let ReplOutputElementRenderer = class ReplOutputElementRenderer {
95
- static { ReplOutputElementRenderer_1 = this; }
96
- static { this.ID = 'outputReplElement'; }
97
- constructor(linkDetector, editorService, labelService, themeService) {
98
- this.linkDetector = linkDetector;
99
- this.editorService = editorService;
100
- this.labelService = labelService;
101
- this.themeService = themeService;
102
- }
103
- get templateId() {
104
- return ReplOutputElementRenderer_1.ID;
105
- }
106
- renderTemplate(container) {
107
- const data = Object.create(null);
108
- container.classList.add('output');
109
- const expression = append(container, $('.output.expression.value-and-source'));
110
- data.container = container;
111
- data.countContainer = append(expression, $('.count-badge-wrapper'));
112
- data.count = ( new CountBadge(data.countContainer, {}, defaultCountBadgeStyles));
113
- data.value = append(expression, $('span.value'));
114
- data.source = append(expression, $('.source'));
115
- data.toDispose = [];
116
- data.toDispose.push(addDisposableListener(data.source, 'click', e => {
117
- e.preventDefault();
118
- e.stopPropagation();
119
- const source = data.getReplElementSource();
120
- if (source) {
121
- source.source.openInEditor(this.editorService, {
122
- startLineNumber: source.lineNumber,
123
- startColumn: source.column,
124
- endLineNumber: source.lineNumber,
125
- endColumn: source.column
126
- });
127
- }
128
- }));
129
- return data;
130
- }
131
- renderElement({ element }, index, templateData) {
132
- this.setElementCount(element, templateData);
133
- templateData.elementListener = element.onDidChangeCount(() => this.setElementCount(element, templateData));
134
- clearNode(templateData.value);
135
- templateData.value.className = 'value';
136
- templateData.value.appendChild(handleANSIOutput(element.value, this.linkDetector, this.themeService, element.session.root));
137
- templateData.value.classList.add((element.severity === Severity.Warning) ? 'warn' : (element.severity === Severity.Error) ? 'error' : (element.severity === Severity.Ignore) ? 'ignore' : 'info');
138
- templateData.source.textContent = element.sourceData ? `${basename(element.sourceData.source.name)}:${element.sourceData.lineNumber}` : '';
139
- templateData.source.title = element.sourceData ? `${this.labelService.getUriLabel(element.sourceData.source.uri)}:${element.sourceData.lineNumber}` : '';
140
- templateData.getReplElementSource = () => element.sourceData;
141
- }
142
- setElementCount(element, templateData) {
143
- if (element.count >= 2) {
144
- templateData.count.setCount(element.count);
145
- templateData.countContainer.hidden = false;
146
- }
147
- else {
148
- templateData.countContainer.hidden = true;
149
- }
150
- }
151
- disposeTemplate(templateData) {
152
- dispose(templateData.toDispose);
153
- }
154
- disposeElement(_element, _index, templateData) {
155
- templateData.elementListener.dispose();
156
- }
157
- };
158
- ReplOutputElementRenderer = ReplOutputElementRenderer_1 = ( __decorate([
159
- ( __param(1, IEditorService)),
160
- ( __param(2, ILabelService)),
161
- ( __param(3, IThemeService))
162
- ], ReplOutputElementRenderer));
163
- let ReplVariablesRenderer = class ReplVariablesRenderer extends AbstractExpressionsRenderer {
164
- static { ReplVariablesRenderer_1 = this; }
165
- static { this.ID = 'replVariable'; }
166
- get templateId() {
167
- return ReplVariablesRenderer_1.ID;
168
- }
169
- constructor(linkDetector, debugService, contextViewService) {
170
- super(debugService, contextViewService);
171
- this.linkDetector = linkDetector;
172
- }
173
- renderElement(node, _index, data) {
174
- const element = node.element;
175
- super.renderExpressionElement(element instanceof ReplVariableElement ? element.expression : element, node, data);
176
- }
177
- renderExpression(expression, data, highlights) {
178
- const isReplVariable = expression instanceof ReplVariableElement;
179
- if (isReplVariable || !expression.name) {
180
- data.label.set('');
181
- renderExpressionValue(isReplVariable ? expression.expression : expression, data.value, { showHover: false, colorize: true, linkDetector: this.linkDetector });
182
- data.expression.classList.remove('nested-variable');
183
- }
184
- else {
185
- renderVariable(expression, data, true, highlights, this.linkDetector);
186
- data.expression.classList.toggle('nested-variable', isNestedVariable(expression));
187
- }
188
- }
189
- getInputBoxOptions(expression) {
190
- return undefined;
191
- }
192
- };
193
- ReplVariablesRenderer = ReplVariablesRenderer_1 = ( __decorate([
194
- ( __param(1, IDebugService)),
195
- ( __param(2, IContextViewService))
196
- ], ReplVariablesRenderer));
197
- class ReplRawObjectsRenderer {
198
- static { this.ID = 'rawObject'; }
199
- constructor(linkDetector) {
200
- this.linkDetector = linkDetector;
201
- }
202
- get templateId() {
203
- return ReplRawObjectsRenderer.ID;
204
- }
205
- renderTemplate(container) {
206
- container.classList.add('output');
207
- const expression = append(container, $('.output.expression'));
208
- const name = append(expression, $('span.name'));
209
- const label = ( new HighlightedLabel(name));
210
- const value = append(expression, $('span.value'));
211
- return { container, expression, name, label, value };
212
- }
213
- renderElement(node, index, templateData) {
214
- const element = node.element;
215
- templateData.label.set(element.name ? `${element.name}:` : '', createMatches(node.filterData));
216
- if (element.name) {
217
- templateData.name.textContent = `${element.name}:`;
218
- }
219
- else {
220
- templateData.name.textContent = '';
221
- }
222
- renderExpressionValue(element.value, templateData.value, {
223
- showHover: false,
224
- linkDetector: this.linkDetector
225
- });
226
- }
227
- disposeTemplate(templateData) {
228
- }
229
- }
230
- function isNestedVariable(element) {
231
- return element instanceof Variable && (element.parent instanceof ReplEvaluationResult || element.parent instanceof Variable);
232
- }
233
- class ReplDelegate extends CachedListVirtualDelegate {
234
- constructor(configurationService, replOptions) {
235
- super();
236
- this.configurationService = configurationService;
237
- this.replOptions = replOptions;
238
- }
239
- getHeight(element) {
240
- const config = this.configurationService.getValue('debug');
241
- if (!config.console.wordWrap) {
242
- return this.estimateHeight(element, true);
243
- }
244
- return super.getHeight(element);
245
- }
246
- estimateHeight(element, ignoreValueLength = false) {
247
- const lineHeight = this.replOptions.replConfiguration.lineHeight;
248
- const countNumberOfLines = (str) => str.match(/\n/g)?.length ?? 0;
249
- const hasValue = (e) => typeof e.value === 'string';
250
- if (hasValue(element) && !isNestedVariable(element)) {
251
- const value = element.value;
252
- const valueRows = countNumberOfLines(value)
253
- + (ignoreValueLength ? 0 : Math.floor(value.length / 70))
254
- + (element instanceof ReplOutputElement ? 0 : 1);
255
- return Math.max(valueRows, 1) * lineHeight;
256
- }
257
- return lineHeight;
258
- }
259
- getTemplateId(element) {
260
- if (element instanceof Variable || element instanceof ReplVariableElement) {
261
- return ReplVariablesRenderer.ID;
262
- }
263
- if (element instanceof ReplEvaluationResult) {
264
- return ReplEvaluationResultsRenderer.ID;
265
- }
266
- if (element instanceof ReplEvaluationInput) {
267
- return ReplEvaluationInputsRenderer.ID;
268
- }
269
- if (element instanceof ReplOutputElement) {
270
- return ReplOutputElementRenderer.ID;
271
- }
272
- if (element instanceof ReplGroup) {
273
- return ReplGroupRenderer.ID;
274
- }
275
- return ReplRawObjectsRenderer.ID;
276
- }
277
- hasDynamicHeight(element) {
278
- if (isNestedVariable(element)) {
279
- return false;
280
- }
281
- return ( element.toString()).length > 0;
282
- }
283
- }
284
- function isDebugSession(obj) {
285
- return typeof obj.getReplElements === 'function';
286
- }
287
- class ReplDataSource {
288
- hasChildren(element) {
289
- if (isDebugSession(element)) {
290
- return true;
291
- }
292
- return !!element.hasChildren;
293
- }
294
- getChildren(element) {
295
- if (isDebugSession(element)) {
296
- return Promise.resolve(element.getReplElements());
297
- }
298
- return Promise.resolve(element.getChildren());
299
- }
300
- }
301
- class ReplAccessibilityProvider {
302
- getWidgetAriaLabel() {
303
- return ( localizeWithPath(
304
- 'vs/workbench/contrib/debug/browser/replViewer',
305
- 'debugConsole',
306
- "Debug Console"
307
- ));
308
- }
309
- getAriaLabel(element) {
310
- if (element instanceof Variable) {
311
- return ( localizeWithPath(
312
- 'vs/workbench/contrib/debug/browser/replViewer',
313
- 'replVariableAriaLabel',
314
- "Variable {0}, value {1}",
315
- element.name,
316
- element.value
317
- ));
318
- }
319
- if (element instanceof ReplOutputElement || element instanceof ReplEvaluationInput || element instanceof ReplEvaluationResult) {
320
- return element.value + (element instanceof ReplOutputElement && element.count > 1 ? ( localizeWithPath(
321
- 'vs/workbench/contrib/debug/browser/replViewer',
322
- { key: 'occurred', comment: ['Front will the value of the debug console element. Placeholder will be replaced by a number which represents occurrance count.'] },
323
- ", occurred {0} times",
324
- element.count
325
- )) : '');
326
- }
327
- if (element instanceof RawObjectReplElement) {
328
- return ( localizeWithPath(
329
- 'vs/workbench/contrib/debug/browser/replViewer',
330
- 'replRawObjectAriaLabel',
331
- "Debug console variable {0}, value {1}",
332
- element.name,
333
- element.value
334
- ));
335
- }
336
- if (element instanceof ReplGroup) {
337
- return ( localizeWithPath(
338
- 'vs/workbench/contrib/debug/browser/replViewer',
339
- 'replGroup',
340
- "Debug console group {0}",
341
- element.name
342
- ));
343
- }
344
- return '';
345
- }
346
- }
347
-
348
- export { ReplAccessibilityProvider, ReplDataSource, ReplDelegate, ReplEvaluationInputsRenderer, ReplEvaluationResultsRenderer, ReplGroupRenderer, ReplOutputElementRenderer, ReplRawObjectsRenderer, ReplVariablesRenderer };
@@ -1,119 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
- import { registerColor, asCssVariableName, asCssVariable } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
4
- import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
5
- import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
6
- import { STATUS_BAR_FOREGROUND, STATUS_BAR_BORDER, COMMAND_CENTER_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
7
- import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
8
- import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
9
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
10
- import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService';
11
-
12
- const STATUS_BAR_DEBUGGING_BACKGROUND = registerColor('statusBar.debuggingBackground', {
13
- dark: '#CC6633',
14
- light: '#CC6633',
15
- hcDark: '#BA592C',
16
- hcLight: '#B5200D'
17
- }, ( localizeWithPath(
18
- 'vs/workbench/contrib/debug/browser/statusbarColorProvider',
19
- 'statusBarDebuggingBackground',
20
- "Status bar background color when a program is being debugged. The status bar is shown in the bottom of the window"
21
- )));
22
- const STATUS_BAR_DEBUGGING_FOREGROUND = registerColor('statusBar.debuggingForeground', {
23
- dark: STATUS_BAR_FOREGROUND,
24
- light: STATUS_BAR_FOREGROUND,
25
- hcDark: STATUS_BAR_FOREGROUND,
26
- hcLight: '#FFFFFF'
27
- }, ( localizeWithPath(
28
- 'vs/workbench/contrib/debug/browser/statusbarColorProvider',
29
- 'statusBarDebuggingForeground',
30
- "Status bar foreground color when a program is being debugged. The status bar is shown in the bottom of the window"
31
- )));
32
- const STATUS_BAR_DEBUGGING_BORDER = registerColor('statusBar.debuggingBorder', {
33
- dark: STATUS_BAR_BORDER,
34
- light: STATUS_BAR_BORDER,
35
- hcDark: STATUS_BAR_BORDER,
36
- hcLight: STATUS_BAR_BORDER
37
- }, ( localizeWithPath(
38
- 'vs/workbench/contrib/debug/browser/statusbarColorProvider',
39
- 'statusBarDebuggingBorder',
40
- "Status bar border color separating to the sidebar and editor when a program is being debugged. The status bar is shown in the bottom of the window"
41
- )));
42
- const COMMAND_CENTER_DEBUGGING_BACKGROUND = registerColor('commandCenter.debuggingBackground', {
43
- dark: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 },
44
- hcDark: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 },
45
- light: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 },
46
- hcLight: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 }
47
- }, ( localizeWithPath(
48
- 'vs/workbench/contrib/debug/browser/statusbarColorProvider',
49
- 'commandCenter-activeBackground',
50
- "Command center background color when a program is being debugged"
51
- )), true);
52
- let StatusBarColorProvider = class StatusBarColorProvider {
53
- set enabled(enabled) {
54
- if (enabled === !!this.disposable) {
55
- return;
56
- }
57
- if (enabled) {
58
- this.disposable = this.statusbarService.overrideStyle({
59
- priority: 10,
60
- foreground: STATUS_BAR_DEBUGGING_FOREGROUND,
61
- background: STATUS_BAR_DEBUGGING_BACKGROUND,
62
- border: STATUS_BAR_DEBUGGING_BORDER,
63
- });
64
- }
65
- else {
66
- this.disposable.dispose();
67
- this.disposable = undefined;
68
- }
69
- }
70
- constructor(debugService, contextService, statusbarService, layoutService, configurationService) {
71
- this.debugService = debugService;
72
- this.contextService = contextService;
73
- this.statusbarService = statusbarService;
74
- this.layoutService = layoutService;
75
- this.configurationService = configurationService;
76
- this.disposables = ( new DisposableStore());
77
- this.debugService.onDidChangeState(this.update, this, this.disposables);
78
- this.contextService.onDidChangeWorkbenchState(this.update, this, this.disposables);
79
- this.configurationService.onDidChangeConfiguration((e) => {
80
- if (e.affectsConfiguration('debug.enableStatusBarColor') || e.affectsConfiguration('debug.toolBarLocation')) {
81
- this.update();
82
- }
83
- });
84
- this.update();
85
- }
86
- update() {
87
- const debugConfig = this.configurationService.getValue('debug');
88
- const isInDebugMode = isStatusbarInDebugMode(this.debugService.state, this.debugService.getModel().getSessions());
89
- if (!debugConfig.enableStatusBarColor) {
90
- this.enabled = false;
91
- }
92
- else {
93
- this.enabled = isInDebugMode;
94
- }
95
- const isInCommandCenter = debugConfig.toolBarLocation === 'commandCenter';
96
- this.layoutService.mainContainer.style.setProperty(asCssVariableName(COMMAND_CENTER_BACKGROUND), isInCommandCenter && isInDebugMode
97
- ? asCssVariable(COMMAND_CENTER_DEBUGGING_BACKGROUND)
98
- : '');
99
- }
100
- dispose() {
101
- this.disposable?.dispose();
102
- this.disposables.dispose();
103
- }
104
- };
105
- StatusBarColorProvider = ( __decorate([
106
- ( __param(0, IDebugService)),
107
- ( __param(1, IWorkspaceContextService)),
108
- ( __param(2, IStatusbarService)),
109
- ( __param(3, ILayoutService)),
110
- ( __param(4, IConfigurationService))
111
- ], StatusBarColorProvider));
112
- function isStatusbarInDebugMode(state, sessions) {
113
- if (state === 0 || state === 1 || sessions.every(s => s.suppressDebugStatusbar || s.configuration?.noDebug)) {
114
- return false;
115
- }
116
- return true;
117
- }
118
-
119
- export { COMMAND_CENTER_DEBUGGING_BACKGROUND, STATUS_BAR_DEBUGGING_BACKGROUND, STATUS_BAR_DEBUGGING_BORDER, STATUS_BAR_DEBUGGING_FOREGROUND, StatusBarColorProvider, isStatusbarInDebugMode };