@codingame/monaco-vscode-bulk-edit-service-override 28.4.1 → 29.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-bulk-edit-service-override",
3
- "version": "28.4.1",
3
+ "version": "29.1.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - bulk-edit service-override",
6
6
  "keywords": [],
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "28.4.1"
18
+ "@codingame/monaco-vscode-api": "29.1.0"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -83,21 +83,21 @@ let BulkEdit = class BulkEdit {
83
83
  }
84
84
  }
85
85
  if (this._edits.length === 0) {
86
- return localize(4608, "Made no edits");
86
+ return localize(4619, "Made no edits");
87
87
  } else if (otherResources.size === 0) {
88
88
  if (textEditCount > 1 && textEditResources.size > 1) {
89
89
  return localize(
90
- 4609,
90
+ 4620,
91
91
  "Made {0} text edits in {1} files",
92
92
  textEditCount,
93
93
  textEditResources.size
94
94
  );
95
95
  } else {
96
- return localize(4610, "Made {0} text edits in one file", textEditCount);
96
+ return localize(4621, "Made {0} text edits in one file", textEditCount);
97
97
  }
98
98
  } else {
99
99
  return localize(
100
- 4611,
100
+ 4622,
101
101
  "Made {0} text edits in {1} files, also created or deleted {2} files",
102
102
  textEditCount,
103
103
  textEditResources.size,
@@ -163,12 +163,12 @@ let BulkEdit = class BulkEdit {
163
163
  }
164
164
  async _performFileEdits(edits, undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress) {
165
165
  this._logService.debug("_performFileEdits", JSON.stringify(edits));
166
- const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(4612, "Workspace Edit")), this._code || "undoredo.workspaceEdit", undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
166
+ const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(4623, "Workspace Edit")), this._code || "undoredo.workspaceEdit", undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
167
167
  return await model.apply();
168
168
  }
169
169
  async _performTextEdits(edits, undoRedoGroup, undoRedoSource, progress, reason) {
170
170
  this._logService.debug("_performTextEdits", JSON.stringify(edits));
171
- const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(4612, "Workspace Edit")), this._code || "undoredo.workspaceEdit", this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
171
+ const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(4623, "Workspace Edit")), this._code || "undoredo.workspaceEdit", this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
172
172
  return await model.apply(reason);
173
173
  }
174
174
  async _performCellEdits(edits, undoRedoGroup, undoRedoSource, progress) {
@@ -217,7 +217,7 @@ let BulkEditService = class BulkEditService {
217
217
  let edits = liftEdits(Array.isArray(editsIn) ? editsIn : editsIn.edits);
218
218
  if (edits.length === 0) {
219
219
  return {
220
- ariaSummary: ( localize(4613, "Made no edits")),
220
+ ariaSummary: ( localize(4624, "Made no edits")),
221
221
  isApplied: false
222
222
  };
223
223
  }
@@ -300,24 +300,24 @@ let BulkEditService = class BulkEditService {
300
300
  let message;
301
301
  switch (reason) {
302
302
  case ShutdownReason.CLOSE:
303
- message = ( localize(4614, "Are you sure you want to close the window?"));
303
+ message = ( localize(4625, "Are you sure you want to close the window?"));
304
304
  break;
305
305
  case ShutdownReason.LOAD:
306
- message = ( localize(4615, "Are you sure you want to change the workspace?"));
306
+ message = ( localize(4626, "Are you sure you want to change the workspace?"));
307
307
  break;
308
308
  case ShutdownReason.RELOAD:
309
- message = ( localize(4616, "Are you sure you want to reload the window?"));
309
+ message = ( localize(4627, "Are you sure you want to reload the window?"));
310
310
  break;
311
311
  default:
312
- message = isMacintosh ? ( localize(4617, "Are you sure you want to quit?")) : ( localize(4618, "Are you sure you want to exit?"));
312
+ message = isMacintosh ? ( localize(4628, "Are you sure you want to quit?")) : ( localize(4629, "Are you sure you want to exit?"));
313
313
  break;
314
314
  }
315
315
  const result = await this._dialogService.confirm({
316
316
  message,
317
317
  detail: ( localize(
318
- 4619,
318
+ 4630,
319
319
  "'{0}' is in progress.",
320
- label || ( localize(4620, "File operation"))
320
+ label || ( localize(4631, "File operation"))
321
321
  ))
322
322
  });
323
323
  return !result.confirmed;
@@ -330,7 +330,7 @@ const autoSaveSetting = "files.refactoring.autoSave";
330
330
  properties: {
331
331
  [autoSaveSetting]: {
332
332
  description: ( localize(
333
- 4621,
333
+ 4632,
334
334
  "Controls if files that were part of a refactoring are saved automatically"
335
335
  )),
336
336
  default: true,
@@ -115,12 +115,12 @@ let BulkEditPreviewContribution = class BulkEditPreviewContribution {
115
115
  confirmed
116
116
  } = await this._dialogService.confirm({
117
117
  type: Severity.Info,
118
- message: ( localize(4622, "Another refactoring is being previewed.")),
118
+ message: ( localize(4633, "Another refactoring is being previewed.")),
119
119
  detail: ( localize(
120
- 4623,
120
+ 4634,
121
121
  "Press 'Continue' to discard the previous refactoring and continue with the current refactoring."
122
122
  )),
123
- primaryButton: ( localize(4624, "&&Continue"))
123
+ primaryButton: ( localize(4635, "&&Continue"))
124
124
  });
125
125
  if (!confirmed) {
126
126
  return [];
@@ -152,8 +152,8 @@ registerAction2(class ApplyAction extends Action2 {
152
152
  constructor() {
153
153
  super({
154
154
  id: "refactorPreview.apply",
155
- title: ( localize2(4625, "Apply Refactoring")),
156
- category: ( localize2(4626, "Refactor Preview")),
155
+ title: ( localize2(4636, "Apply Refactoring")),
156
+ category: ( localize2(4637, "Refactor Preview")),
157
157
  icon: Codicon.check,
158
158
  precondition: ( ContextKeyExpr.and(BulkEditPreviewContribution.ctxEnabled, BulkEditPane.ctxHasCheckedChanges)),
159
159
  menu: [{
@@ -177,8 +177,8 @@ registerAction2(class DiscardAction extends Action2 {
177
177
  constructor() {
178
178
  super({
179
179
  id: "refactorPreview.discard",
180
- title: ( localize2(4627, "Discard Refactoring")),
181
- category: ( localize2(4626, "Refactor Preview")),
180
+ title: ( localize2(4638, "Discard Refactoring")),
181
+ category: ( localize2(4637, "Refactor Preview")),
182
182
  icon: Codicon.clearAll,
183
183
  precondition: BulkEditPreviewContribution.ctxEnabled,
184
184
  menu: [{
@@ -197,8 +197,8 @@ registerAction2(class ToggleAction extends Action2 {
197
197
  constructor() {
198
198
  super({
199
199
  id: "refactorPreview.toggleCheckedState",
200
- title: ( localize2(4628, "Toggle Change")),
201
- category: ( localize2(4626, "Refactor Preview")),
200
+ title: ( localize2(4639, "Toggle Change")),
201
+ category: ( localize2(4637, "Refactor Preview")),
202
202
  precondition: BulkEditPreviewContribution.ctxEnabled,
203
203
  keybinding: {
204
204
  weight: KeybindingWeight.WorkbenchContrib,
@@ -221,8 +221,8 @@ registerAction2(class GroupByFile extends Action2 {
221
221
  constructor() {
222
222
  super({
223
223
  id: "refactorPreview.groupByFile",
224
- title: ( localize2(4629, "Group Changes By File")),
225
- category: ( localize2(4626, "Refactor Preview")),
224
+ title: ( localize2(4640, "Group Changes By File")),
225
+ category: ( localize2(4637, "Refactor Preview")),
226
226
  icon: Codicon.ungroupByRefType,
227
227
  precondition: ( ContextKeyExpr.and(BulkEditPane.ctxHasCategories, ( BulkEditPane.ctxGroupByFile.negate()), BulkEditPreviewContribution.ctxEnabled)),
228
228
  menu: [{
@@ -243,8 +243,8 @@ registerAction2(class GroupByType extends Action2 {
243
243
  constructor() {
244
244
  super({
245
245
  id: "refactorPreview.groupByType",
246
- title: ( localize2(4630, "Group Changes By Type")),
247
- category: ( localize2(4626, "Refactor Preview")),
246
+ title: ( localize2(4641, "Group Changes By Type")),
247
+ category: ( localize2(4637, "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(4630, "Group Changes By Type")),
273
- category: ( localize2(4626, "Refactor Preview")),
272
+ title: ( localize2(4641, "Group Changes By Type")),
273
+ category: ( localize2(4637, "Refactor Preview")),
274
274
  icon: Codicon.listTree,
275
275
  toggled: ( BulkEditPane.ctxGroupByFile.negate()),
276
276
  precondition: ( ContextKeyExpr.and(BulkEditPane.ctxHasCategories, BulkEditPreviewContribution.ctxEnabled)),
@@ -291,10 +291,10 @@ registerWorkbenchContribution2(
291
291
  BulkEditPreviewContribution,
292
292
  WorkbenchPhase.BlockRestore
293
293
  );
294
- const refactorPreviewViewIcon = registerIcon("refactor-preview-view-icon", Codicon.lightbulb, ( localize(4631, "View icon of the refactor preview view.")));
294
+ const refactorPreviewViewIcon = registerIcon("refactor-preview-view-icon", Codicon.lightbulb, ( localize(4642, "View icon of the refactor preview view.")));
295
295
  const container = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
296
296
  id: BulkEditPane.ID,
297
- title: ( localize2(4632, "Refactor Preview")),
297
+ title: ( localize2(4643, "Refactor Preview")),
298
298
  hideIfEmpty: true,
299
299
  ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [BulkEditPane.ID, {
300
300
  mergeViewWithContainerWhenSingleView: true
@@ -304,7 +304,7 @@ const container = ( Registry.as(Extensions.ViewContainersRegistry)).registerView
304
304
  }, ViewContainerLocation.Panel);
305
305
  ( Registry.as(Extensions.ViewsRegistry)).registerViews([{
306
306
  id: BulkEditPane.ID,
307
- name: ( localize2(4632, "Refactor Preview")),
307
+ name: ( localize2(4643, "Refactor Preview")),
308
308
  when: BulkEditPreviewContribution.ctxEnabled,
309
309
  ctorDescriptor: ( new SyncDescriptor(BulkEditPane)),
310
310
  containerIcon: refactorPreviewViewIcon
@@ -194,18 +194,18 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
194
194
  supportIcons: true,
195
195
  ...defaultButtonStyles
196
196
  });
197
- btnConfirm.label = ( localize(4633, "Apply"));
197
+ btnConfirm.label = ( localize(4644, "Apply"));
198
198
  btnConfirm.onDidClick(() => this.accept(), this, this._disposables);
199
199
  const btnCancel = buttonBar.addButton({
200
200
  ...defaultButtonStyles,
201
201
  secondary: true
202
202
  });
203
- btnCancel.label = ( localize(4634, "Discard"));
203
+ btnCancel.label = ( localize(4645, "Discard"));
204
204
  btnCancel.onDidClick(() => this.discard(), this, this._disposables);
205
205
  this._message = createElement("span");
206
206
  this._message.className = "message";
207
207
  this._message.innerText = ( localize(
208
- 4635,
208
+ 4646,
209
209
  "Invoke a code action, like rename, to see a preview of its changes here."
210
210
  ));
211
211
  parent.appendChild(this._message);
@@ -280,7 +280,7 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
280
280
  let message;
281
281
  if (conflicts.length === 1) {
282
282
  message = ( localize(
283
- 4636,
283
+ 4647,
284
284
  "Cannot apply refactoring because '{0}' has changed in the meantime.",
285
285
  this._labelService.getUriLabel(conflicts[0], {
286
286
  relative: true
@@ -288,7 +288,7 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
288
288
  ));
289
289
  } else {
290
290
  message = ( localize(
291
- 4637,
291
+ 4648,
292
292
  "Cannot apply refactoring because {0} other files have changed in the meantime.",
293
293
  conflicts.length
294
294
  ));
@@ -102,7 +102,7 @@ class BulkFileOperation {
102
102
  class BulkCategory {
103
103
  static {
104
104
  this._defaultMetadata = ( Object.freeze({
105
- label: ( localize(4638, "Other")),
105
+ label: ( localize(4649, "Other")),
106
106
  icon: Codicon.symbolFile,
107
107
  needsConfirmation: false
108
108
  }));
@@ -240,7 +240,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
240
240
  this._labelService = _labelService;
241
241
  }
242
242
  getWidgetAriaLabel() {
243
- return localize(4639, "Bulk Edit");
243
+ return localize(4650, "Bulk Edit");
244
244
  }
245
245
  getRole(_element) {
246
246
  return "checkbox";
@@ -250,7 +250,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
250
250
  if (element.edit.textEdits.length > 0) {
251
251
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
252
252
  return localize(
253
- 4640,
253
+ 4651,
254
254
  "Renaming {0} to {1}, also making text edits",
255
255
  this._labelService.getUriLabel(element.edit.uri, {
256
256
  relative: true
@@ -261,7 +261,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
261
261
  );
262
262
  } else if (element.edit.type & BulkFileOperationType.Create) {
263
263
  return localize(
264
- 4641,
264
+ 4652,
265
265
  "Creating {0}, also making text edits",
266
266
  this._labelService.getUriLabel(element.edit.uri, {
267
267
  relative: true
@@ -269,7 +269,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
269
269
  );
270
270
  } else if (element.edit.type & BulkFileOperationType.Delete) {
271
271
  return localize(
272
- 4642,
272
+ 4653,
273
273
  "Deleting {0}, also making text edits",
274
274
  this._labelService.getUriLabel(element.edit.uri, {
275
275
  relative: true
@@ -277,7 +277,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
277
277
  );
278
278
  } else {
279
279
  return localize(
280
- 4643,
280
+ 4654,
281
281
  "{0}, making text edits",
282
282
  this._labelService.getUriLabel(element.edit.uri, {
283
283
  relative: true
@@ -287,7 +287,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
287
287
  } else {
288
288
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
289
289
  return localize(
290
- 4644,
290
+ 4655,
291
291
  "Renaming {0} to {1}",
292
292
  this._labelService.getUriLabel(element.edit.uri, {
293
293
  relative: true
@@ -297,11 +297,11 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
297
297
  })
298
298
  );
299
299
  } else if (element.edit.type & BulkFileOperationType.Create) {
300
- return localize(4645, "Creating {0}", this._labelService.getUriLabel(element.edit.uri, {
300
+ return localize(4656, "Creating {0}", this._labelService.getUriLabel(element.edit.uri, {
301
301
  relative: true
302
302
  }));
303
303
  } else if (element.edit.type & BulkFileOperationType.Delete) {
304
- return localize(4646, "Deleting {0}", this._labelService.getUriLabel(element.edit.uri, {
304
+ return localize(4657, "Deleting {0}", this._labelService.getUriLabel(element.edit.uri, {
305
305
  relative: true
306
306
  }));
307
307
  }
@@ -310,7 +310,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
310
310
  if (element instanceof TextEditElement) {
311
311
  if (element.selecting.length > 0 && element.inserting.length > 0) {
312
312
  return localize(
313
- 4647,
313
+ 4658,
314
314
  "line {0}, replacing {1} with {2}",
315
315
  element.edit.textEdit.textEdit.range.startLineNumber,
316
316
  element.selecting,
@@ -318,14 +318,14 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
318
318
  );
319
319
  } else if (element.selecting.length > 0 && element.inserting.length === 0) {
320
320
  return localize(
321
- 4648,
321
+ 4659,
322
322
  "line {0}, removing {1}",
323
323
  element.edit.textEdit.textEdit.range.startLineNumber,
324
324
  element.selecting
325
325
  );
326
326
  } else if (element.selecting.length === 0 && element.inserting.length > 0) {
327
327
  return localize(
328
- 4649,
328
+ 4660,
329
329
  "line {0}, inserting {1}",
330
330
  element.edit.textEdit.textEdit.range.startLineNumber,
331
331
  element.selecting
@@ -430,7 +430,7 @@ let FileElementTemplate = class FileElementTemplate {
430
430
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
431
431
  this._label.setResource({
432
432
  resource: element.edit.uri,
433
- name: ( localize(4650, "{0} → {1}", this._labelService.getUriLabel(element.edit.uri, {
433
+ name: ( localize(4661, "{0} → {1}", this._labelService.getUriLabel(element.edit.uri, {
434
434
  relative: true
435
435
  }), this._labelService.getUriLabel(element.edit.newUri, {
436
436
  relative: true
@@ -441,7 +441,7 @@ let FileElementTemplate = class FileElementTemplate {
441
441
  badges: false
442
442
  }
443
443
  });
444
- this._details.innerText = ( localize(4651, "(renaming)"));
444
+ this._details.innerText = ( localize(4662, "(renaming)"));
445
445
  } else {
446
446
  const options = {
447
447
  matches: createMatches(score),
@@ -453,9 +453,9 @@ let FileElementTemplate = class FileElementTemplate {
453
453
  extraClasses: []
454
454
  };
455
455
  if (element.edit.type & BulkFileOperationType.Create) {
456
- this._details.innerText = ( localize(4652, "(creating)"));
456
+ this._details.innerText = ( localize(4663, "(creating)"));
457
457
  } else if (element.edit.type & BulkFileOperationType.Delete) {
458
- this._details.innerText = ( localize(4653, "(deleting)"));
458
+ this._details.innerText = ( localize(4664, "(deleting)"));
459
459
  options.extraClasses.push("delete");
460
460
  } else {
461
461
  this._details.innerText = "";
@@ -540,7 +540,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
540
540
  metadata
541
541
  } = element.edit.textEdit;
542
542
  if (metadata && metadata.description) {
543
- title = ( localize(4654, "{0} - {1}", metadata.label, metadata.description));
543
+ title = ( localize(4665, "{0} - {1}", metadata.label, metadata.description));
544
544
  } else if (metadata) {
545
545
  title = metadata.label;
546
546
  }