@codingame/monaco-vscode-bulk-edit-service-override 8.0.0 → 8.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-bulk-edit-service-override",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@8.0.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@8.0.1"
30
30
  }
31
31
  }
@@ -68,24 +68,24 @@ let BulkEdit = class BulkEdit {
68
68
  }
69
69
  }
70
70
  if (this._edits.length === 0) {
71
- return ( localize(1627, "Made no edits"));
71
+ return ( localize(2089, "Made no edits"));
72
72
  }
73
73
  else if (otherResources.size === 0) {
74
74
  if (textEditCount > 1 && textEditResources.size > 1) {
75
75
  return ( localize(
76
- 1628,
76
+ 2090,
77
77
  "Made {0} text edits in {1} files",
78
78
  textEditCount,
79
79
  textEditResources.size
80
80
  ));
81
81
  }
82
82
  else {
83
- return ( localize(1629, "Made {0} text edits in one file", textEditCount));
83
+ return ( localize(2091, "Made {0} text edits in one file", textEditCount));
84
84
  }
85
85
  }
86
86
  else {
87
87
  return ( localize(
88
- 1630,
88
+ 2092,
89
89
  "Made {0} text edits in {1} files, also created or deleted {2} files",
90
90
  textEditCount,
91
91
  textEditResources.size,
@@ -134,12 +134,12 @@ let BulkEdit = class BulkEdit {
134
134
  }
135
135
  async _performFileEdits(edits, undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress) {
136
136
  this._logService.debug('_performFileEdits', JSON.stringify(edits));
137
- const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(1631, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
137
+ const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(2093, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
138
138
  return await model.apply();
139
139
  }
140
140
  async _performTextEdits(edits, undoRedoGroup, undoRedoSource, progress) {
141
141
  this._logService.debug('_performTextEdits', JSON.stringify(edits));
142
- const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(1631, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
142
+ const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(2093, "Workspace Edit")), this._code || 'undoredo.workspaceEdit', this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
143
143
  return await model.apply();
144
144
  }
145
145
  async _performCellEdits(edits, undoRedoGroup, undoRedoSource, progress) {
@@ -177,7 +177,7 @@ let BulkEditService = class BulkEditService {
177
177
  async apply(editsIn, options) {
178
178
  let edits = liftEdits(Array.isArray(editsIn) ? editsIn : editsIn.edits);
179
179
  if (edits.length === 0) {
180
- return { ariaSummary: ( localize(1632, "Made no edits")), isApplied: false };
180
+ return { ariaSummary: ( localize(2094, "Made no edits")), isApplied: false };
181
181
  }
182
182
  if (this._previewHandler && (options?.showPreview || ( (edits.some(value => value.metadata?.needsConfirmation))))) {
183
183
  edits = await this._previewHandler(edits, options);
@@ -248,25 +248,25 @@ let BulkEditService = class BulkEditService {
248
248
  let primaryButton;
249
249
  switch (reason) {
250
250
  case ShutdownReason.CLOSE:
251
- message = ( localize(1633, "Are you sure you want to close the window?"));
252
- primaryButton = ( localize(1634, "&&Close Window"));
251
+ message = ( localize(2095, "Are you sure you want to close the window?"));
252
+ primaryButton = ( localize(2096, "&&Close Window"));
253
253
  break;
254
254
  case ShutdownReason.LOAD:
255
- message = ( localize(1635, "Are you sure you want to change the workspace?"));
256
- primaryButton = ( localize(1636, "Change &&Workspace"));
255
+ message = ( localize(2097, "Are you sure you want to change the workspace?"));
256
+ primaryButton = ( localize(2098, "Change &&Workspace"));
257
257
  break;
258
258
  case ShutdownReason.RELOAD:
259
- message = ( localize(1637, "Are you sure you want to reload the window?"));
260
- primaryButton = ( localize(1638, "&&Reload Window"));
259
+ message = ( localize(2099, "Are you sure you want to reload the window?"));
260
+ primaryButton = ( localize(2100, "&&Reload Window"));
261
261
  break;
262
262
  default:
263
- message = ( localize(1639, "Are you sure you want to quit?"));
264
- primaryButton = ( localize(1640, "&&Quit"));
263
+ message = ( localize(2101, "Are you sure you want to quit?"));
264
+ primaryButton = ( localize(2102, "&&Quit"));
265
265
  break;
266
266
  }
267
267
  const result = await this._dialogService.confirm({
268
268
  message,
269
- detail: ( localize(1641, "'{0}' is in progress.", label || ( localize(1642, "File operation")))),
269
+ detail: ( localize(2103, "'{0}' is in progress.", label || ( localize(2104, "File operation")))),
270
270
  primaryButton
271
271
  });
272
272
  return !result.confirmed;
@@ -287,7 +287,7 @@ const autoSaveSetting = 'files.refactoring.autoSave';
287
287
  properties: {
288
288
  [autoSaveSetting]: {
289
289
  description: ( localize(
290
- 1643,
290
+ 2105,
291
291
  "Controls if files that were part of a refactoring are saved automatically"
292
292
  )),
293
293
  default: true,
@@ -96,12 +96,12 @@ let BulkEditPreviewContribution = class BulkEditPreviewContribution {
96
96
  if (view.hasInput()) {
97
97
  const { confirmed } = await this._dialogService.confirm({
98
98
  type: Severity$1.Info,
99
- message: ( localize(1644, "Another refactoring is being previewed.")),
99
+ message: ( localize(2106, "Another refactoring is being previewed.")),
100
100
  detail: ( localize(
101
- 1645,
101
+ 2107,
102
102
  "Press 'Continue' to discard the previous refactoring and continue with the current refactoring."
103
103
  )),
104
- primaryButton: ( localize(1646, "&&Continue"))
104
+ primaryButton: ( localize(2108, "&&Continue"))
105
105
  });
106
106
  if (!confirmed) {
107
107
  return [];
@@ -142,8 +142,8 @@ registerAction2(class ApplyAction extends Action2 {
142
142
  constructor() {
143
143
  super({
144
144
  id: 'refactorPreview.apply',
145
- title: ( localize2(1647, "Apply Refactoring")),
146
- category: ( localize2(1648, "Refactor Preview")),
145
+ title: ( localize2(2109, "Apply Refactoring")),
146
+ category: ( localize2(2110, "Refactor Preview")),
147
147
  icon: Codicon.check,
148
148
  precondition: ( (ContextKeyExpr.and(BulkEditPreviewContribution.ctxEnabled, BulkEditPane.ctxHasCheckedChanges))),
149
149
  menu: [{
@@ -170,8 +170,8 @@ registerAction2(class DiscardAction extends Action2 {
170
170
  constructor() {
171
171
  super({
172
172
  id: 'refactorPreview.discard',
173
- title: ( localize2(1649, "Discard Refactoring")),
174
- category: ( localize2(1649, "Refactor Preview")),
173
+ title: ( localize2(2111, "Discard Refactoring")),
174
+ category: ( localize2(2110, "Refactor Preview")),
175
175
  icon: Codicon.clearAll,
176
176
  precondition: BulkEditPreviewContribution.ctxEnabled,
177
177
  menu: [{
@@ -190,8 +190,8 @@ registerAction2(class ToggleAction extends Action2 {
190
190
  constructor() {
191
191
  super({
192
192
  id: 'refactorPreview.toggleCheckedState',
193
- title: ( localize2(1650, "Toggle Change")),
194
- category: ( localize2(1650, "Refactor Preview")),
193
+ title: ( localize2(2112, "Toggle Change")),
194
+ category: ( localize2(2110, "Refactor Preview")),
195
195
  precondition: BulkEditPreviewContribution.ctxEnabled,
196
196
  keybinding: {
197
197
  weight: KeybindingWeight.WorkbenchContrib,
@@ -214,8 +214,8 @@ registerAction2(class GroupByFile extends Action2 {
214
214
  constructor() {
215
215
  super({
216
216
  id: 'refactorPreview.groupByFile',
217
- title: ( localize2(1651, "Group Changes By File")),
218
- category: ( localize2(1651, "Refactor Preview")),
217
+ title: ( localize2(2113, "Group Changes By File")),
218
+ category: ( localize2(2110, "Refactor Preview")),
219
219
  icon: Codicon.ungroupByRefType,
220
220
  precondition: ( (ContextKeyExpr.and(
221
221
  BulkEditPane.ctxHasCategories,
@@ -243,8 +243,8 @@ registerAction2(class GroupByType extends Action2 {
243
243
  constructor() {
244
244
  super({
245
245
  id: 'refactorPreview.groupByType',
246
- title: ( localize2(1652, "Group Changes By Type")),
247
- category: ( localize2(1652, "Refactor Preview")),
246
+ title: ( localize2(2114, "Group Changes By Type")),
247
+ category: ( localize2(2110, "Refactor Preview")),
248
248
  icon: Codicon.groupByRefType,
249
249
  precondition: ( (ContextKeyExpr.and(
250
250
  BulkEditPane.ctxHasCategories,
@@ -269,8 +269,8 @@ registerAction2(class ToggleGrouping extends Action2 {
269
269
  constructor() {
270
270
  super({
271
271
  id: 'refactorPreview.toggleGrouping',
272
- title: ( localize2(1652, "Group Changes By Type")),
273
- category: ( localize2(1652, "Refactor Preview")),
272
+ title: ( localize2(2114, "Group Changes By Type")),
273
+ category: ( localize2(2110, "Refactor Preview")),
274
274
  icon: Codicon.listTree,
275
275
  toggled: ( (BulkEditPane.ctxGroupByFile.negate())),
276
276
  precondition: ( (ContextKeyExpr.and(BulkEditPane.ctxHasCategories, BulkEditPreviewContribution.ctxEnabled))),
@@ -287,10 +287,10 @@ registerAction2(class ToggleGrouping extends Action2 {
287
287
  }
288
288
  });
289
289
  registerWorkbenchContribution2(BulkEditPreviewContribution.ID, BulkEditPreviewContribution, WorkbenchPhase.BlockRestore);
290
- const refactorPreviewViewIcon = registerIcon('refactor-preview-view-icon', Codicon.lightbulb, ( localize(1653, 'View icon of the refactor preview view.')));
290
+ const refactorPreviewViewIcon = registerIcon('refactor-preview-view-icon', Codicon.lightbulb, ( localize(2115, 'View icon of the refactor preview view.')));
291
291
  const container = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
292
292
  id: BulkEditPane.ID,
293
- title: ( localize2(1654, "Refactor Preview")),
293
+ title: ( localize2(2116, "Refactor Preview")),
294
294
  hideIfEmpty: true,
295
295
  ctorDescriptor: ( (new SyncDescriptor(
296
296
  ViewPaneContainer,
@@ -301,7 +301,7 @@ const container = ( (Registry.as(Extensions.ViewContainersRegistry))).registerVi
301
301
  }, ViewContainerLocation.Panel);
302
302
  ( (Registry.as(Extensions.ViewsRegistry))).registerViews([{
303
303
  id: BulkEditPane.ID,
304
- name: ( localize2(1654, "Refactor Preview")),
304
+ name: ( localize2(2116, "Refactor Preview")),
305
305
  when: BulkEditPreviewContribution.ctxEnabled,
306
306
  ctorDescriptor: ( (new SyncDescriptor(BulkEditPane))),
307
307
  containerIcon: refactorPreviewViewIcon,
@@ -138,15 +138,15 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
138
138
  const buttonBar = ( (new ButtonBar(buttonsContainer)));
139
139
  this._disposables.add(buttonBar);
140
140
  const btnConfirm = buttonBar.addButton({ supportIcons: true, ...defaultButtonStyles });
141
- btnConfirm.label = ( localize(5313, 'Apply'));
141
+ btnConfirm.label = ( localize(5286, 'Apply'));
142
142
  btnConfirm.onDidClick(() => this.accept(), this, this._disposables);
143
143
  const btnCancel = buttonBar.addButton({ ...defaultButtonStyles, secondary: true });
144
- btnCancel.label = ( localize(5314, 'Discard'));
144
+ btnCancel.label = ( localize(5287, 'Discard'));
145
145
  btnCancel.onDidClick(() => this.discard(), this, this._disposables);
146
146
  this._message = document.createElement('span');
147
147
  this._message.className = 'message';
148
148
  this._message.innerText = ( localize(
149
- 5315,
149
+ 5288,
150
150
  "Invoke a code action, like rename, to see a preview of its changes here."
151
151
  ));
152
152
  parent.appendChild(this._message);
@@ -221,14 +221,14 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
221
221
  let message;
222
222
  if (conflicts.length === 1) {
223
223
  message = ( localize(
224
- 5316,
224
+ 5289,
225
225
  "Cannot apply refactoring because '{0}' has changed in the meantime.",
226
226
  this._labelService.getUriLabel(conflicts[0], { relative: true })
227
227
  ));
228
228
  }
229
229
  else {
230
230
  message = ( localize(
231
- 5317,
231
+ 5290,
232
232
  "Cannot apply refactoring because {0} other files have changed in the meantime.",
233
233
  conflicts.length
234
234
  ));
@@ -102,7 +102,7 @@ class BulkFileOperation {
102
102
  }
103
103
  class BulkCategory {
104
104
  static { this._defaultMetadata = ( (Object.freeze({
105
- label: ( localize(9990, "Other")),
105
+ label: ( localize(9969, "Other")),
106
106
  icon: Codicon.symbolFile,
107
107
  needsConfirmation: false
108
108
  }))); }
@@ -254,7 +254,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
254
254
  this._labelService = _labelService;
255
255
  }
256
256
  getWidgetAriaLabel() {
257
- return ( localize(9991, "Bulk Edit"));
257
+ return ( localize(9970, "Bulk Edit"));
258
258
  }
259
259
  getRole(_element) {
260
260
  return 'checkbox';
@@ -264,7 +264,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
264
264
  if (element.edit.textEdits.length > 0) {
265
265
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
266
266
  return ( localize(
267
- 9992,
267
+ 9971,
268
268
  "Renaming {0} to {1}, also making text edits",
269
269
  this._labelService.getUriLabel(element.edit.uri, { relative: true }),
270
270
  this._labelService.getUriLabel(element.edit.newUri, { relative: true })
@@ -272,21 +272,21 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
272
272
  }
273
273
  else if (element.edit.type & BulkFileOperationType.Create) {
274
274
  return ( localize(
275
- 9993,
275
+ 9972,
276
276
  "Creating {0}, also making text edits",
277
277
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
278
278
  ));
279
279
  }
280
280
  else if (element.edit.type & BulkFileOperationType.Delete) {
281
281
  return ( localize(
282
- 9994,
282
+ 9973,
283
283
  "Deleting {0}, also making text edits",
284
284
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
285
285
  ));
286
286
  }
287
287
  else {
288
288
  return ( localize(
289
- 9995,
289
+ 9974,
290
290
  "{0}, making text edits",
291
291
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
292
292
  ));
@@ -295,7 +295,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
295
295
  else {
296
296
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
297
297
  return ( localize(
298
- 9996,
298
+ 9975,
299
299
  "Renaming {0} to {1}",
300
300
  this._labelService.getUriLabel(element.edit.uri, { relative: true }),
301
301
  this._labelService.getUriLabel(element.edit.newUri, { relative: true })
@@ -303,14 +303,14 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
303
303
  }
304
304
  else if (element.edit.type & BulkFileOperationType.Create) {
305
305
  return ( localize(
306
- 9997,
306
+ 9976,
307
307
  "Creating {0}",
308
308
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
309
309
  ));
310
310
  }
311
311
  else if (element.edit.type & BulkFileOperationType.Delete) {
312
312
  return ( localize(
313
- 9998,
313
+ 9977,
314
314
  "Deleting {0}",
315
315
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
316
316
  ));
@@ -320,7 +320,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
320
320
  if (element instanceof TextEditElement) {
321
321
  if (element.selecting.length > 0 && element.inserting.length > 0) {
322
322
  return ( localize(
323
- 9999,
323
+ 9978,
324
324
  "line {0}, replacing {1} with {2}",
325
325
  element.edit.textEdit.textEdit.range.startLineNumber,
326
326
  element.selecting,
@@ -329,7 +329,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
329
329
  }
330
330
  else if (element.selecting.length > 0 && element.inserting.length === 0) {
331
331
  return ( localize(
332
- 10000,
332
+ 9979,
333
333
  "line {0}, removing {1}",
334
334
  element.edit.textEdit.textEdit.range.startLineNumber,
335
335
  element.selecting
@@ -337,7 +337,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
337
337
  }
338
338
  else if (element.selecting.length === 0 && element.inserting.length > 0) {
339
339
  return ( localize(
340
- 10001,
340
+ 9980,
341
341
  "line {0}, inserting {1}",
342
342
  element.edit.textEdit.textEdit.range.startLineNumber,
343
343
  element.selecting
@@ -445,7 +445,7 @@ let FileElementTemplate = class FileElementTemplate {
445
445
  this._label.setResource({
446
446
  resource: element.edit.uri,
447
447
  name: ( localize(
448
- 10002,
448
+ 9981,
449
449
  "{0} → {1}",
450
450
  this._labelService.getUriLabel(element.edit.uri, { relative: true }),
451
451
  this._labelService.getUriLabel(element.edit.newUri, { relative: true })
@@ -453,7 +453,7 @@ let FileElementTemplate = class FileElementTemplate {
453
453
  }, {
454
454
  fileDecorations: { colors: true, badges: false }
455
455
  });
456
- this._details.innerText = ( localize(10003, "(renaming)"));
456
+ this._details.innerText = ( localize(9982, "(renaming)"));
457
457
  }
458
458
  else {
459
459
  const options = {
@@ -463,10 +463,10 @@ let FileElementTemplate = class FileElementTemplate {
463
463
  extraClasses: []
464
464
  };
465
465
  if (element.edit.type & BulkFileOperationType.Create) {
466
- this._details.innerText = ( localize(10004, "(creating)"));
466
+ this._details.innerText = ( localize(9983, "(creating)"));
467
467
  }
468
468
  else if (element.edit.type & BulkFileOperationType.Delete) {
469
- this._details.innerText = ( localize(10005, "(deleting)"));
469
+ this._details.innerText = ( localize(9984, "(deleting)"));
470
470
  options.extraClasses.push('delete');
471
471
  }
472
472
  else {
@@ -545,7 +545,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
545
545
  let title;
546
546
  const { metadata } = element.edit.textEdit;
547
547
  if (metadata && metadata.description) {
548
- title = ( localize(10006, "{0} - {1}", metadata.label, metadata.description));
548
+ title = ( localize(9985, "{0} - {1}", metadata.label, metadata.description));
549
549
  }
550
550
  else if (metadata) {
551
551
  title = metadata.label;