@codingame/monaco-vscode-bulk-edit-service-override 38.1.3 → 39.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": "38.1.3",
3
+ "version": "39.0.1",
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": "38.1.3"
18
+ "@codingame/monaco-vscode-api": "39.0.1"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -13,6 +13,7 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
13
13
  import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
14
14
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
15
15
  import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
16
+ import { canLog, LogLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log';
16
17
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
17
18
  import { Progress } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
18
19
  import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
@@ -83,21 +84,21 @@ let BulkEdit = class BulkEdit {
83
84
  }
84
85
  }
85
86
  if (this._edits.length === 0) {
86
- return localize(8887, "Made no edits");
87
+ return localize(10315, "Made no edits");
87
88
  } else if (otherResources.size === 0) {
88
89
  if (textEditCount > 1 && textEditResources.size > 1) {
89
90
  return localize(
90
- 8888,
91
+ 10316,
91
92
  "Made {0} text edits in {1} files",
92
93
  textEditCount,
93
94
  textEditResources.size
94
95
  );
95
96
  } else {
96
- return localize(8889, "Made {0} text edits in one file", textEditCount);
97
+ return localize(10317, "Made {0} text edits in one file", textEditCount);
97
98
  }
98
99
  } else {
99
100
  return localize(
100
- 8890,
101
+ 10318,
101
102
  "Made {0} text edits in {1} files, also created or deleted {2} files",
102
103
  textEditCount,
103
104
  textEditResources.size,
@@ -161,23 +162,28 @@ let BulkEdit = class BulkEdit {
161
162
  }
162
163
  return resources.flat();
163
164
  }
165
+ _logEdits(operation, edits) {
166
+ if (canLog(this._logService.getLevel(), LogLevel.Debug)) {
167
+ this._logService.debug(operation, JSON.stringify(edits));
168
+ }
169
+ }
164
170
  async _performFileEdits(edits, undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress) {
165
- this._logService.debug("_performFileEdits", JSON.stringify(edits));
166
- const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(8891, "Workspace Edit")), this._code || "undoredo.workspaceEdit", undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
171
+ this._logEdits("_performFileEdits", edits);
172
+ const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localize(10319, "Workspace Edit")), this._code || "undoredo.workspaceEdit", undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress, this._token, edits);
167
173
  return await model.apply();
168
174
  }
169
175
  async _performTextEdits(edits, undoRedoGroup, undoRedoSource, progress, reason) {
170
- this._logService.debug("_performTextEdits", JSON.stringify(edits));
171
- const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(8891, "Workspace Edit")), this._code || "undoredo.workspaceEdit", this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
176
+ this._logEdits("_performTextEdits", edits);
177
+ const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localize(10319, "Workspace Edit")), this._code || "undoredo.workspaceEdit", this._editor, undoRedoGroup, undoRedoSource, progress, this._token, edits);
172
178
  return await model.apply(reason);
173
179
  }
174
180
  async _performCellEdits(edits, undoRedoGroup, undoRedoSource, progress) {
175
- this._logService.debug("_performCellEdits", JSON.stringify(edits));
181
+ this._logEdits("_performCellEdits", edits);
176
182
  const model = this._instaService.createInstance(BulkCellEdits, undoRedoGroup, undoRedoSource, progress, this._token, edits);
177
183
  return await model.apply();
178
184
  }
179
185
  async _performOpaqueEdits(edits, undoRedoGroup, undoRedoSource, progress) {
180
- this._logService.debug("_performOpaqueEdits", JSON.stringify(edits));
186
+ this._logEdits("_performOpaqueEdits", edits);
181
187
  const model = this._instaService.createInstance(OpaqueEdits, undoRedoGroup, undoRedoSource, progress, this._token, edits);
182
188
  return await model.apply();
183
189
  }
@@ -217,7 +223,7 @@ let BulkEditService = class BulkEditService {
217
223
  let edits = liftEdits(Array.isArray(editsIn) ? editsIn : editsIn.edits);
218
224
  if (edits.length === 0) {
219
225
  return {
220
- ariaSummary: ( localize(8892, "Made no edits")),
226
+ ariaSummary: ( localize(10320, "Made no edits")),
221
227
  isApplied: false
222
228
  };
223
229
  }
@@ -300,24 +306,24 @@ let BulkEditService = class BulkEditService {
300
306
  let message;
301
307
  switch (reason) {
302
308
  case ShutdownReason.CLOSE:
303
- message = ( localize(8893, "Are you sure you want to close the window?"));
309
+ message = ( localize(10321, "Are you sure you want to close the window?"));
304
310
  break;
305
311
  case ShutdownReason.LOAD:
306
- message = ( localize(8894, "Are you sure you want to change the workspace?"));
312
+ message = ( localize(10322, "Are you sure you want to change the workspace?"));
307
313
  break;
308
314
  case ShutdownReason.RELOAD:
309
- message = ( localize(8895, "Are you sure you want to reload the window?"));
315
+ message = ( localize(10323, "Are you sure you want to reload the window?"));
310
316
  break;
311
317
  default:
312
- message = isMacintosh ? ( localize(8896, "Are you sure you want to quit?")) : ( localize(8897, "Are you sure you want to exit?"));
318
+ message = isMacintosh ? ( localize(10324, "Are you sure you want to quit?")) : ( localize(10325, "Are you sure you want to exit?"));
313
319
  break;
314
320
  }
315
321
  const result = await this._dialogService.confirm({
316
322
  message,
317
323
  detail: ( localize(
318
- 8898,
324
+ 10326,
319
325
  "'{0}' is in progress.",
320
- label || ( localize(8899, "File operation"))
326
+ label || ( localize(10327, "File operation"))
321
327
  ))
322
328
  });
323
329
  return !result.confirmed;
@@ -330,7 +336,7 @@ const autoSaveSetting = "files.refactoring.autoSave";
330
336
  properties: {
331
337
  [autoSaveSetting]: {
332
338
  description: ( localize(
333
- 8900,
339
+ 10328,
334
340
  "Controls if files that were part of a refactoring are saved automatically"
335
341
  )),
336
342
  default: true,