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