@codingame/monaco-vscode-debug-service-override 1.82.4 → 1.82.5-next.1

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 (73) hide show
  1. package/debug.d.ts +5 -0
  2. package/debug.js +24 -0
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
  4. package/external/tslib/tslib.es6.js +11 -0
  5. package/index.d.ts +1 -1
  6. package/index.js +1 -1
  7. package/override/vs/platform/dialogs/common/dialogs.js +8 -0
  8. package/package.json +2 -2
  9. package/vscode/src/vs/editor/common/services/languageFeaturesService.js +44 -0
  10. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +200 -0
  11. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +785 -0
  12. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +399 -0
  13. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1298 -0
  14. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
  15. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +960 -0
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +497 -0
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +347 -0
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +299 -0
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +400 -0
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +827 -0
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +621 -0
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +60 -0
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +527 -0
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +681 -0
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +356 -0
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +206 -0
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +82 -0
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +143 -0
  29. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +1174 -0
  30. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +1144 -0
  31. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +106 -0
  32. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +68 -0
  33. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +275 -0
  34. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +314 -0
  35. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +168 -0
  36. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +663 -0
  37. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +105 -0
  38. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +231 -0
  39. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +631 -0
  40. package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +6 -0
  41. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +6 -0
  42. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +6 -0
  43. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +6 -0
  44. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +6 -0
  45. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +6 -0
  46. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +6 -0
  47. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +6 -0
  48. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +695 -0
  49. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +953 -0
  50. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +48 -0
  51. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +336 -0
  52. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +98 -0
  53. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +575 -0
  54. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +415 -0
  55. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +102 -0
  56. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +21 -0
  57. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +17 -0
  58. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +100 -0
  59. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +59 -0
  60. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1482 -0
  61. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +346 -0
  62. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +123 -0
  63. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +175 -0
  64. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +36 -0
  65. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +117 -0
  66. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +260 -0
  67. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +27 -0
  68. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +83 -0
  69. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +283 -0
  70. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +305 -0
  71. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +28 -0
  72. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +176 -0
  73. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +12 -0
@@ -0,0 +1,399 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import './media/breakpointWidget.css.js';
3
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
4
+ import { SelectBox } from 'monaco-editor/esm/vs/base/browser/ui/selectBox/selectBox.js';
5
+ import * as lifecycle from 'monaco-editor/esm/vs/base/common/lifecycle.js';
6
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
7
+ import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
8
+ import { ZoneWidget } from 'monaco-editor/esm/vs/editor/contrib/zoneWidget/browser/zoneWidget.js';
9
+ import { IContextViewService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
10
+ import { CONTEXT_BREAKPOINT_WIDGET_VISIBLE, CONTEXT_IN_BREAKPOINT_WIDGET, BREAKPOINT_EDITOR_CONTRIBUTION_ID, DEBUG_SCHEME, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
11
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
12
+ import { createDecorator, IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
13
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
14
+ import { EditorCommand, registerEditorCommand } from 'monaco-editor/esm/vs/editor/browser/editorExtensions.js';
15
+ import { EditorContextKeys } from 'monaco-editor/esm/vs/editor/common/editorContextKeys.js';
16
+ import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
17
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
18
+ import { provideSuggestionItems, CompletionOptions } from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js';
19
+ import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
20
+ import { editorForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
21
+ import { ServiceCollection } from 'monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js';
22
+ import { CodeEditorWidget } from 'monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js';
23
+ import { getSimpleCodeEditorWidgetOptions, getSimpleEditorOptions } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
24
+ import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
25
+ import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
26
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
27
+ import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
28
+ import { ILanguageFeaturesService } from 'monaco-editor/esm/vs/editor/common/services/languageFeatures.js';
29
+ import { defaultSelectBoxStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
30
+ import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
31
+
32
+ const $ = dom.$;
33
+ const IPrivateBreakpointWidgetService = ( (createDecorator('privateBreakpointWidgetService')));
34
+ const DECORATION_KEY = 'breakpointwidgetdecoration';
35
+ function isPositionInCurlyBracketBlock(input) {
36
+ const model = input.getModel();
37
+ const bracketPairs = model.bracketPairs.getBracketPairsInRange(Range.fromPositions(input.getPosition()));
38
+ return (
39
+ (bracketPairs.some(p => p.openingBracketInfo.bracketText === '{'))
40
+ );
41
+ }
42
+ function createDecorations(theme, placeHolder) {
43
+ const transparentForeground = theme.getColor(editorForeground)?.transparent(0.4);
44
+ return [{
45
+ range: {
46
+ startLineNumber: 0,
47
+ endLineNumber: 0,
48
+ startColumn: 0,
49
+ endColumn: 1
50
+ },
51
+ renderOptions: {
52
+ after: {
53
+ contentText: placeHolder,
54
+ color: transparentForeground ? ( (transparentForeground.toString())) : undefined
55
+ }
56
+ }
57
+ }];
58
+ }
59
+ let BreakpointWidget = class BreakpointWidget extends ZoneWidget {
60
+ constructor(editor, lineNumber, column, context, contextViewService, debugService, themeService, contextKeyService, instantiationService, modelService, codeEditorService, _configurationService, languageFeaturesService, keybindingService) {
61
+ super(editor, { showFrame: true, showArrow: false, frameWidth: 1, isAccessible: true });
62
+ this.lineNumber = lineNumber;
63
+ this.column = column;
64
+ this.contextViewService = contextViewService;
65
+ this.debugService = debugService;
66
+ this.themeService = themeService;
67
+ this.contextKeyService = contextKeyService;
68
+ this.instantiationService = instantiationService;
69
+ this.modelService = modelService;
70
+ this.codeEditorService = codeEditorService;
71
+ this._configurationService = _configurationService;
72
+ this.languageFeaturesService = languageFeaturesService;
73
+ this.keybindingService = keybindingService;
74
+ this.conditionInput = '';
75
+ this.hitCountInput = '';
76
+ this.logMessageInput = '';
77
+ this.toDispose = [];
78
+ const model = this.editor.getModel();
79
+ if (model) {
80
+ const uri = model.uri;
81
+ const breakpoints = this.debugService.getModel().getBreakpoints({ lineNumber: this.lineNumber, column: this.column, uri });
82
+ this.breakpoint = breakpoints.length ? breakpoints[0] : undefined;
83
+ }
84
+ if (context === undefined) {
85
+ if (this.breakpoint && !this.breakpoint.condition && !this.breakpoint.hitCondition && this.breakpoint.logMessage) {
86
+ this.context = 2 ;
87
+ }
88
+ else if (this.breakpoint && !this.breakpoint.condition && this.breakpoint.hitCondition) {
89
+ this.context = 1 ;
90
+ }
91
+ else {
92
+ this.context = 0 ;
93
+ }
94
+ }
95
+ else {
96
+ this.context = context;
97
+ }
98
+ this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(e => {
99
+ if (this.breakpoint && e && e.removed && e.removed.indexOf(this.breakpoint) >= 0) {
100
+ this.dispose();
101
+ }
102
+ }));
103
+ this.codeEditorService.registerDecorationType('breakpoint-widget', DECORATION_KEY, {});
104
+ this.create();
105
+ }
106
+ get placeholder() {
107
+ const acceptString = this.keybindingService.lookupKeybinding(AcceptBreakpointWidgetInputAction.ID)?.getLabel() || 'Enter';
108
+ const closeString = this.keybindingService.lookupKeybinding(CloseBreakpointWidgetCommand.ID)?.getLabel() || 'Escape';
109
+ switch (this.context) {
110
+ case 2 :
111
+ return (
112
+ (nls.localize(
113
+ 'breakpointWidgetLogMessagePlaceholder',
114
+ "Message to log when breakpoint is hit. Expressions within {} are interpolated. '{0}' to accept, '{1}' to cancel.",
115
+ acceptString,
116
+ closeString
117
+ ))
118
+ );
119
+ case 1 :
120
+ return (
121
+ (nls.localize(
122
+ 'breakpointWidgetHitCountPlaceholder',
123
+ "Break when hit count condition is met. '{0}' to accept, '{1}' to cancel.",
124
+ acceptString,
125
+ closeString
126
+ ))
127
+ );
128
+ default:
129
+ return (
130
+ (nls.localize(
131
+ 'breakpointWidgetExpressionPlaceholder',
132
+ "Break when expression evaluates to true. '{0}' to accept, '{1}' to cancel.",
133
+ acceptString,
134
+ closeString
135
+ ))
136
+ );
137
+ }
138
+ }
139
+ getInputValue(breakpoint) {
140
+ switch (this.context) {
141
+ case 2 :
142
+ return breakpoint && breakpoint.logMessage ? breakpoint.logMessage : this.logMessageInput;
143
+ case 1 :
144
+ return breakpoint && breakpoint.hitCondition ? breakpoint.hitCondition : this.hitCountInput;
145
+ default:
146
+ return breakpoint && breakpoint.condition ? breakpoint.condition : this.conditionInput;
147
+ }
148
+ }
149
+ rememberInput() {
150
+ const value = this.input.getModel().getValue();
151
+ switch (this.context) {
152
+ case 2 :
153
+ this.logMessageInput = value;
154
+ break;
155
+ case 1 :
156
+ this.hitCountInput = value;
157
+ break;
158
+ default:
159
+ this.conditionInput = value;
160
+ }
161
+ }
162
+ setInputMode() {
163
+ if (this.editor.hasModel()) {
164
+ const languageId = this.context === 2 ? PLAINTEXT_LANGUAGE_ID : this.editor.getModel().getLanguageId();
165
+ this.input.getModel().setLanguage(languageId);
166
+ }
167
+ }
168
+ show(rangeOrPos) {
169
+ const lineNum = this.input.getModel().getLineCount();
170
+ super.show(rangeOrPos, lineNum + 1);
171
+ }
172
+ fitHeightToContent() {
173
+ const lineNum = this.input.getModel().getLineCount();
174
+ this._relayout(lineNum + 1);
175
+ }
176
+ _fillContainer(container) {
177
+ this.setCssClass('breakpoint-widget');
178
+ const selectBox = ( (new SelectBox(
179
+ [{ text: ( (nls.localize('expression', "Expression"))) }, { text: ( (nls.localize('hitCount', "Hit Count"))) }, { text: ( (nls.localize('logMessage', "Log Message"))) }],
180
+ this.context,
181
+ this.contextViewService,
182
+ defaultSelectBoxStyles,
183
+ { ariaLabel: ( (nls.localize('breakpointType', 'Breakpoint Type'))) }
184
+ )));
185
+ this.selectContainer = $('.breakpoint-select-container');
186
+ selectBox.render(dom.append(container, this.selectContainer));
187
+ selectBox.onDidSelect(e => {
188
+ this.rememberInput();
189
+ this.context = e.index;
190
+ this.setInputMode();
191
+ const value = this.getInputValue(this.breakpoint);
192
+ this.input.getModel().setValue(value);
193
+ this.input.focus();
194
+ });
195
+ this.inputContainer = $('.inputContainer');
196
+ this.createBreakpointInput(dom.append(container, this.inputContainer));
197
+ this.input.getModel().setValue(this.getInputValue(this.breakpoint));
198
+ this.toDispose.push(this.input.getModel().onDidChangeContent(() => {
199
+ this.fitHeightToContent();
200
+ }));
201
+ this.input.setPosition({ lineNumber: 1, column: this.input.getModel().getLineMaxColumn(1) });
202
+ setTimeout(() => this.input.focus(), 150);
203
+ }
204
+ _doLayout(heightInPixel, widthInPixel) {
205
+ this.heightInPx = heightInPixel;
206
+ this.input.layout({ height: heightInPixel, width: widthInPixel - 113 });
207
+ this.centerInputVertically();
208
+ }
209
+ _onWidth(widthInPixel) {
210
+ if (typeof this.heightInPx === 'number') {
211
+ this._doLayout(this.heightInPx, widthInPixel);
212
+ }
213
+ }
214
+ createBreakpointInput(container) {
215
+ const scopedContextKeyService = this.contextKeyService.createScoped(container);
216
+ this.toDispose.push(scopedContextKeyService);
217
+ const scopedInstatiationService = this.instantiationService.createChild(( (new ServiceCollection(
218
+ [IContextKeyService, scopedContextKeyService],
219
+ [IPrivateBreakpointWidgetService, this]
220
+ ))));
221
+ const options = this.createEditorOptions();
222
+ const codeEditorWidgetOptions = getSimpleCodeEditorWidgetOptions();
223
+ this.input = scopedInstatiationService.createInstance(CodeEditorWidget, container, options, codeEditorWidgetOptions);
224
+ CONTEXT_IN_BREAKPOINT_WIDGET.bindTo(scopedContextKeyService).set(true);
225
+ const model = this.modelService.createModel('', null, ( URI.parse(`${DEBUG_SCHEME}:${this.editor.getId()}:breakpointinput`)), true);
226
+ if (this.editor.hasModel()) {
227
+ model.setLanguage(this.editor.getModel().getLanguageId());
228
+ }
229
+ this.input.setModel(model);
230
+ this.setInputMode();
231
+ this.toDispose.push(model);
232
+ const setDecorations = () => {
233
+ const value = this.input.getModel().getValue();
234
+ const decorations = !!value ? [] : createDecorations(this.themeService.getColorTheme(), this.placeholder);
235
+ this.input.setDecorationsByType('breakpoint-widget', DECORATION_KEY, decorations);
236
+ };
237
+ this.input.getModel().onDidChangeContent(() => setDecorations());
238
+ this.themeService.onDidColorThemeChange(() => setDecorations());
239
+ this.toDispose.push(this.languageFeaturesService.completionProvider.register({ scheme: DEBUG_SCHEME, hasAccessToAllModels: true }, {
240
+ _debugDisplayName: 'breakpointWidget',
241
+ provideCompletionItems: (model, position, _context, token) => {
242
+ let suggestionsPromise;
243
+ const underlyingModel = this.editor.getModel();
244
+ if (underlyingModel && (this.context === 0 || (this.context === 2 && isPositionInCurlyBracketBlock(this.input)))) {
245
+ suggestionsPromise = provideSuggestionItems(this.languageFeaturesService.completionProvider, underlyingModel, ( (new Position(this.lineNumber, 1))), ( (new CompletionOptions(
246
+ undefined,
247
+ ( (new Set())).add(27 )
248
+ ))), _context, token).then(suggestions => {
249
+ let overwriteBefore = 0;
250
+ if (this.context === 0 ) {
251
+ overwriteBefore = position.column - 1;
252
+ }
253
+ else {
254
+ const value = this.input.getModel().getValue();
255
+ while ((position.column - 2 - overwriteBefore >= 0) && value[position.column - 2 - overwriteBefore] !== '{' && value[position.column - 2 - overwriteBefore] !== ' ') {
256
+ overwriteBefore++;
257
+ }
258
+ }
259
+ return {
260
+ suggestions: ( (suggestions.items.map(s => {
261
+ s.completion.range = Range.fromPositions(position.delta(0, -overwriteBefore), position);
262
+ return s.completion;
263
+ })))
264
+ };
265
+ });
266
+ }
267
+ else {
268
+ suggestionsPromise = Promise.resolve({ suggestions: [] });
269
+ }
270
+ return suggestionsPromise;
271
+ }
272
+ }));
273
+ this.toDispose.push(this._configurationService.onDidChangeConfiguration((e) => {
274
+ if (e.affectsConfiguration('editor.fontSize') || e.affectsConfiguration('editor.lineHeight')) {
275
+ this.input.updateOptions(this.createEditorOptions());
276
+ this.centerInputVertically();
277
+ }
278
+ }));
279
+ }
280
+ createEditorOptions() {
281
+ const editorConfig = this._configurationService.getValue('editor');
282
+ const options = getSimpleEditorOptions(this._configurationService);
283
+ options.fontSize = editorConfig.fontSize;
284
+ options.fontFamily = editorConfig.fontFamily;
285
+ options.lineHeight = editorConfig.lineHeight;
286
+ options.fontLigatures = editorConfig.fontLigatures;
287
+ options.ariaLabel = this.placeholder;
288
+ return options;
289
+ }
290
+ centerInputVertically() {
291
+ if (this.container && typeof this.heightInPx === 'number') {
292
+ const lineHeight = this.input.getOption(65 );
293
+ const lineNum = this.input.getModel().getLineCount();
294
+ const newTopMargin = (this.heightInPx - lineNum * lineHeight) / 2;
295
+ this.inputContainer.style.marginTop = newTopMargin + 'px';
296
+ }
297
+ }
298
+ close(success) {
299
+ if (success) {
300
+ let condition = this.breakpoint && this.breakpoint.condition;
301
+ let hitCondition = this.breakpoint && this.breakpoint.hitCondition;
302
+ let logMessage = this.breakpoint && this.breakpoint.logMessage;
303
+ this.rememberInput();
304
+ if (this.conditionInput || this.context === 0 ) {
305
+ condition = this.conditionInput;
306
+ }
307
+ if (this.hitCountInput || this.context === 1 ) {
308
+ hitCondition = this.hitCountInput;
309
+ }
310
+ if (this.logMessageInput || this.context === 2 ) {
311
+ logMessage = this.logMessageInput;
312
+ }
313
+ if (this.breakpoint) {
314
+ const data = ( (new Map()));
315
+ data.set(this.breakpoint.getId(), {
316
+ condition,
317
+ hitCondition,
318
+ logMessage
319
+ });
320
+ this.debugService.updateBreakpoints(this.breakpoint.originalUri, data, false).then(undefined, onUnexpectedError);
321
+ }
322
+ else {
323
+ const model = this.editor.getModel();
324
+ if (model) {
325
+ this.debugService.addBreakpoints(model.uri, [{
326
+ lineNumber: this.lineNumber,
327
+ column: this.column,
328
+ enabled: true,
329
+ condition,
330
+ hitCondition,
331
+ logMessage
332
+ }]);
333
+ }
334
+ }
335
+ }
336
+ this.dispose();
337
+ }
338
+ dispose() {
339
+ super.dispose();
340
+ this.input.dispose();
341
+ lifecycle.dispose(this.toDispose);
342
+ setTimeout(() => this.editor.focus(), 0);
343
+ }
344
+ };
345
+ BreakpointWidget = ( (__decorate([
346
+ ( (__param(4, IContextViewService))),
347
+ ( (__param(5, IDebugService))),
348
+ ( (__param(6, IThemeService))),
349
+ ( (__param(7, IContextKeyService))),
350
+ ( (__param(8, IInstantiationService))),
351
+ ( (__param(9, IModelService))),
352
+ ( (__param(10, ICodeEditorService))),
353
+ ( (__param(11, IConfigurationService))),
354
+ ( (__param(12, ILanguageFeaturesService))),
355
+ ( (__param(13, IKeybindingService)))
356
+ ], BreakpointWidget)));
357
+ class AcceptBreakpointWidgetInputAction extends EditorCommand {
358
+ static { this.ID = 'breakpointWidget.action.acceptInput'; }
359
+ constructor() {
360
+ super({
361
+ id: AcceptBreakpointWidgetInputAction.ID,
362
+ precondition: CONTEXT_BREAKPOINT_WIDGET_VISIBLE,
363
+ kbOpts: {
364
+ kbExpr: CONTEXT_IN_BREAKPOINT_WIDGET,
365
+ primary: 3 ,
366
+ weight: 100
367
+ }
368
+ });
369
+ }
370
+ runEditorCommand(accessor, editor) {
371
+ accessor.get(IPrivateBreakpointWidgetService).close(true);
372
+ }
373
+ }
374
+ class CloseBreakpointWidgetCommand extends EditorCommand {
375
+ static { this.ID = 'closeBreakpointWidget'; }
376
+ constructor() {
377
+ super({
378
+ id: CloseBreakpointWidgetCommand.ID,
379
+ precondition: CONTEXT_BREAKPOINT_WIDGET_VISIBLE,
380
+ kbOpts: {
381
+ kbExpr: EditorContextKeys.textInputFocus,
382
+ primary: 9 ,
383
+ secondary: [1024 | 9 ],
384
+ weight: 100
385
+ }
386
+ });
387
+ }
388
+ runEditorCommand(accessor, editor, args) {
389
+ const debugContribution = editor.getContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID);
390
+ if (debugContribution) {
391
+ return debugContribution.closeBreakpointWidget();
392
+ }
393
+ accessor.get(IPrivateBreakpointWidgetService).close(false);
394
+ }
395
+ }
396
+ registerEditorCommand(( (new AcceptBreakpointWidgetInputAction())));
397
+ registerEditorCommand(( (new CloseBreakpointWidgetCommand())));
398
+
399
+ export { BreakpointWidget };