@codingame/monaco-vscode-bulk-edit-service-override 7.1.0 → 7.1.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": "7.1.0",
3
+ "version": "7.1.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@7.1.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@7.1.1"
30
30
  }
31
31
  }
@@ -6,7 +6,7 @@ import { ResourceMap, ResourceSet } from 'vscode/vscode/vs/base/common/map';
6
6
  import { isCodeEditor, isDiffEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
7
7
  import { ResourceTextEdit, ResourceFileEdit } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
8
8
  import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
9
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
9
+ import { localize } from 'vscode/vscode/vs/nls';
10
10
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
11
11
  import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
12
12
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
@@ -24,7 +24,6 @@ import { ShutdownReason } from 'vscode/vscode/vs/workbench/services/lifecycle/co
24
24
  import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
25
25
  import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
26
26
 
27
- const _moduleId = "vs/workbench/contrib/bulkEdit/browser/bulkEditService";
28
27
  function liftEdits(edits) {
29
28
  return (
30
29
  (edits.map(edit => {
@@ -69,26 +68,24 @@ let BulkEdit = class BulkEdit {
69
68
  }
70
69
  }
71
70
  if (this._edits.length === 0) {
72
- return ( localizeWithPath(_moduleId, 0, "Made no edits"));
71
+ return ( localize(2089, "Made no edits"));
73
72
  }
74
73
  else if (otherResources.size === 0) {
75
74
  if (textEditCount > 1 && textEditResources.size > 1) {
76
- return ( localizeWithPath(
77
- _moduleId,
78
- 1,
75
+ return ( localize(
76
+ 2090,
79
77
  "Made {0} text edits in {1} files",
80
78
  textEditCount,
81
79
  textEditResources.size
82
80
  ));
83
81
  }
84
82
  else {
85
- return ( localizeWithPath(_moduleId, 2, "Made {0} text edits in one file", textEditCount));
83
+ return ( localize(2091, "Made {0} text edits in one file", textEditCount));
86
84
  }
87
85
  }
88
86
  else {
89
- return ( localizeWithPath(
90
- _moduleId,
91
- 3,
87
+ return ( localize(
88
+ 2092,
92
89
  "Made {0} text edits in {1} files, also created or deleted {2} files",
93
90
  textEditCount,
94
91
  textEditResources.size,
@@ -137,12 +134,12 @@ let BulkEdit = class BulkEdit {
137
134
  }
138
135
  async _performFileEdits(edits, undoRedoGroup, undoRedoSource, confirmBeforeUndo, progress) {
139
136
  this._logService.debug('_performFileEdits', JSON.stringify(edits));
140
- const model = this._instaService.createInstance(BulkFileEdits, this._label || ( localizeWithPath(_moduleId, 4, "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);
141
138
  return await model.apply();
142
139
  }
143
140
  async _performTextEdits(edits, undoRedoGroup, undoRedoSource, progress) {
144
141
  this._logService.debug('_performTextEdits', JSON.stringify(edits));
145
- const model = this._instaService.createInstance(BulkTextEdits, this._label || ( localizeWithPath(_moduleId, 4, "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);
146
143
  return await model.apply();
147
144
  }
148
145
  async _performCellEdits(edits, undoRedoGroup, undoRedoSource, progress) {
@@ -180,7 +177,7 @@ let BulkEditService = class BulkEditService {
180
177
  async apply(editsIn, options) {
181
178
  let edits = liftEdits(Array.isArray(editsIn) ? editsIn : editsIn.edits);
182
179
  if (edits.length === 0) {
183
- return { ariaSummary: ( localizeWithPath(_moduleId, 5, "Made no edits")), isApplied: false };
180
+ return { ariaSummary: ( localize(2094, "Made no edits")), isApplied: false };
184
181
  }
185
182
  if (this._previewHandler && (options?.showPreview || ( (edits.some(value => value.metadata?.needsConfirmation))))) {
186
183
  edits = await this._previewHandler(edits, options);
@@ -251,25 +248,25 @@ let BulkEditService = class BulkEditService {
251
248
  let primaryButton;
252
249
  switch (reason) {
253
250
  case ShutdownReason.CLOSE:
254
- message = ( localizeWithPath(_moduleId, 6, "Are you sure you want to close the window?"));
255
- primaryButton = ( localizeWithPath(_moduleId, 7, "&&Close Window"));
251
+ message = ( localize(2095, "Are you sure you want to close the window?"));
252
+ primaryButton = ( localize(2096, "&&Close Window"));
256
253
  break;
257
254
  case ShutdownReason.LOAD:
258
- message = ( localizeWithPath(_moduleId, 8, "Are you sure you want to change the workspace?"));
259
- primaryButton = ( localizeWithPath(_moduleId, 9, "Change &&Workspace"));
255
+ message = ( localize(2097, "Are you sure you want to change the workspace?"));
256
+ primaryButton = ( localize(2098, "Change &&Workspace"));
260
257
  break;
261
258
  case ShutdownReason.RELOAD:
262
- message = ( localizeWithPath(_moduleId, 10, "Are you sure you want to reload the window?"));
263
- primaryButton = ( localizeWithPath(_moduleId, 11, "&&Reload Window"));
259
+ message = ( localize(2099, "Are you sure you want to reload the window?"));
260
+ primaryButton = ( localize(2100, "&&Reload Window"));
264
261
  break;
265
262
  default:
266
- message = ( localizeWithPath(_moduleId, 12, "Are you sure you want to quit?"));
267
- primaryButton = ( localizeWithPath(_moduleId, 13, "&&Quit"));
263
+ message = ( localize(2101, "Are you sure you want to quit?"));
264
+ primaryButton = ( localize(2102, "&&Quit"));
268
265
  break;
269
266
  }
270
267
  const result = await this._dialogService.confirm({
271
268
  message,
272
- detail: ( localizeWithPath(_moduleId, 14, "'{0}' is in progress.", label || ( localizeWithPath(_moduleId, 15, "File operation")))),
269
+ detail: ( localize(2103, "'{0}' is in progress.", label || ( localize(2104, "File operation")))),
273
270
  primaryButton
274
271
  });
275
272
  return !result.confirmed;
@@ -289,9 +286,8 @@ const autoSaveSetting = 'files.refactoring.autoSave';
289
286
  id: 'files',
290
287
  properties: {
291
288
  [autoSaveSetting]: {
292
- description: ( localizeWithPath(
293
- _moduleId,
294
- 16,
289
+ description: ( localize(
290
+ 2105,
295
291
  "Controls if files that were part of a refactoring are saved automatically"
296
292
  )),
297
293
  default: true,
@@ -6,7 +6,7 @@ import { BulkEditPane } from './bulkEditPane.js';
6
6
  import { ViewContainerLocation, Extensions } from 'vscode/vscode/vs/workbench/common/views';
7
7
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
8
8
  import { FocusedViewContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
9
- import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
9
+ import { localize, localize2 } from 'vscode/vscode/vs/nls';
10
10
  import { ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
11
11
  import { RawContextKey, ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
12
12
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
@@ -25,7 +25,6 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
25
25
  import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
26
26
 
27
27
  var BulkEditPreviewContribution_1;
28
- const _moduleId = "vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution";
29
28
  async function getBulkEditPane(viewsService) {
30
29
  const view = await viewsService.openView(BulkEditPane.ID, true);
31
30
  if (view instanceof BulkEditPane) {
@@ -97,13 +96,12 @@ let BulkEditPreviewContribution = class BulkEditPreviewContribution {
97
96
  if (view.hasInput()) {
98
97
  const { confirmed } = await this._dialogService.confirm({
99
98
  type: Severity$1.Info,
100
- message: ( localizeWithPath(_moduleId, 0, "Another refactoring is being previewed.")),
101
- detail: ( localizeWithPath(
102
- _moduleId,
103
- 1,
99
+ message: ( localize(2106, "Another refactoring is being previewed.")),
100
+ detail: ( localize(
101
+ 2107,
104
102
  "Press 'Continue' to discard the previous refactoring and continue with the current refactoring."
105
103
  )),
106
- primaryButton: ( localizeWithPath(_moduleId, 2, "&&Continue"))
104
+ primaryButton: ( localize(2108, "&&Continue"))
107
105
  });
108
106
  if (!confirmed) {
109
107
  return [];
@@ -144,8 +142,8 @@ registerAction2(class ApplyAction extends Action2 {
144
142
  constructor() {
145
143
  super({
146
144
  id: 'refactorPreview.apply',
147
- title: ( localize2WithPath(_moduleId, 3, "Apply Refactoring")),
148
- category: ( localize2WithPath(_moduleId, 4, "Refactor Preview")),
145
+ title: ( localize2(2109, "Apply Refactoring")),
146
+ category: ( localize2(2110, "Refactor Preview")),
149
147
  icon: Codicon.check,
150
148
  precondition: ( (ContextKeyExpr.and(BulkEditPreviewContribution.ctxEnabled, BulkEditPane.ctxHasCheckedChanges))),
151
149
  menu: [{
@@ -172,8 +170,8 @@ registerAction2(class DiscardAction extends Action2 {
172
170
  constructor() {
173
171
  super({
174
172
  id: 'refactorPreview.discard',
175
- title: ( localize2WithPath(_moduleId, 5, "Discard Refactoring")),
176
- category: ( localize2WithPath(_moduleId, 4, "Refactor Preview")),
173
+ title: ( localize2(2111, "Discard Refactoring")),
174
+ category: ( localize2(2111, "Refactor Preview")),
177
175
  icon: Codicon.clearAll,
178
176
  precondition: BulkEditPreviewContribution.ctxEnabled,
179
177
  menu: [{
@@ -192,8 +190,8 @@ registerAction2(class ToggleAction extends Action2 {
192
190
  constructor() {
193
191
  super({
194
192
  id: 'refactorPreview.toggleCheckedState',
195
- title: ( localize2WithPath(_moduleId, 6, "Toggle Change")),
196
- category: ( localize2WithPath(_moduleId, 4, "Refactor Preview")),
193
+ title: ( localize2(2112, "Toggle Change")),
194
+ category: ( localize2(2112, "Refactor Preview")),
197
195
  precondition: BulkEditPreviewContribution.ctxEnabled,
198
196
  keybinding: {
199
197
  weight: KeybindingWeight.WorkbenchContrib,
@@ -216,8 +214,8 @@ registerAction2(class GroupByFile extends Action2 {
216
214
  constructor() {
217
215
  super({
218
216
  id: 'refactorPreview.groupByFile',
219
- title: ( localize2WithPath(_moduleId, 7, "Group Changes By File")),
220
- category: ( localize2WithPath(_moduleId, 4, "Refactor Preview")),
217
+ title: ( localize2(2113, "Group Changes By File")),
218
+ category: ( localize2(2113, "Refactor Preview")),
221
219
  icon: Codicon.ungroupByRefType,
222
220
  precondition: ( (ContextKeyExpr.and(
223
221
  BulkEditPane.ctxHasCategories,
@@ -245,8 +243,8 @@ registerAction2(class GroupByType extends Action2 {
245
243
  constructor() {
246
244
  super({
247
245
  id: 'refactorPreview.groupByType',
248
- title: ( localize2WithPath(_moduleId, 8, "Group Changes By Type")),
249
- category: ( localize2WithPath(_moduleId, 4, "Refactor Preview")),
246
+ title: ( localize2(2114, "Group Changes By Type")),
247
+ category: ( localize2(2114, "Refactor Preview")),
250
248
  icon: Codicon.groupByRefType,
251
249
  precondition: ( (ContextKeyExpr.and(
252
250
  BulkEditPane.ctxHasCategories,
@@ -271,8 +269,8 @@ registerAction2(class ToggleGrouping extends Action2 {
271
269
  constructor() {
272
270
  super({
273
271
  id: 'refactorPreview.toggleGrouping',
274
- title: ( localize2WithPath(_moduleId, 8, "Group Changes By Type")),
275
- category: ( localize2WithPath(_moduleId, 4, "Refactor Preview")),
272
+ title: ( localize2(2114, "Group Changes By Type")),
273
+ category: ( localize2(2114, "Refactor Preview")),
276
274
  icon: Codicon.listTree,
277
275
  toggled: ( (BulkEditPane.ctxGroupByFile.negate())),
278
276
  precondition: ( (ContextKeyExpr.and(BulkEditPane.ctxHasCategories, BulkEditPreviewContribution.ctxEnabled))),
@@ -289,10 +287,10 @@ registerAction2(class ToggleGrouping extends Action2 {
289
287
  }
290
288
  });
291
289
  registerWorkbenchContribution2(BulkEditPreviewContribution.ID, BulkEditPreviewContribution, WorkbenchPhase.BlockRestore);
292
- const refactorPreviewViewIcon = registerIcon('refactor-preview-view-icon', Codicon.lightbulb, ( localizeWithPath(_moduleId, 9, '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.')));
293
291
  const container = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
294
292
  id: BulkEditPane.ID,
295
- title: ( localize2WithPath(_moduleId, 10, "Refactor Preview")),
293
+ title: ( localize2(2116, "Refactor Preview")),
296
294
  hideIfEmpty: true,
297
295
  ctorDescriptor: ( (new SyncDescriptor(
298
296
  ViewPaneContainer,
@@ -303,7 +301,7 @@ const container = ( (Registry.as(Extensions.ViewContainersRegistry))).registerVi
303
301
  }, ViewContainerLocation.Panel);
304
302
  ( (Registry.as(Extensions.ViewsRegistry))).registerViews([{
305
303
  id: BulkEditPane.ID,
306
- name: ( localize2WithPath(_moduleId, 10, "Refactor Preview")),
304
+ name: ( localize2(2116, "Refactor Preview")),
307
305
  when: BulkEditPreviewContribution.ctxEnabled,
308
306
  ctorDescriptor: ( (new SyncDescriptor(BulkEditPane))),
309
307
  containerIcon: refactorPreviewViewIcon,
@@ -1,38 +1,37 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import './bulkEdit.css.js';
3
- import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
4
- import { compareBulkFileOperations, BulkEditDataSource, BulkEditDelegate, TextEditElementRenderer, FileElementRenderer, CategoryElementRenderer, BulkEditAccessibilityProvider, BulkEditIdentityProvider, BulkEditNaviLabelProvider, BulkEditSorter, FileElement, CategoryElement, TextEditElement } from './bulkEditTree.js';
5
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
- import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
7
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
+ import { ButtonBar } from 'vscode/vscode/vs/base/browser/ui/button/button';
3
+ import { LRUCachedFunction, CachedFunction } from 'vscode/vscode/vs/base/common/cache';
8
4
  import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
9
- import { SIDE_GROUP, ACTIVE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
10
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
11
- import { BulkFileOperationType, BulkEditPreviewProvider, BulkFileOperations } from './bulkEditPreview.js';
12
- import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
13
- import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
14
5
  import { URI } from 'vscode/vscode/vs/base/common/uri';
15
- import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
16
- import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
17
- import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
6
+ import './bulkEdit.css.js';
7
+ import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
8
+ import { localize } from 'vscode/vscode/vs/nls';
9
+ import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
18
10
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
19
11
  import { RawContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
20
12
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
21
- import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
13
+ import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
22
14
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
23
- import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
15
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
16
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
17
+ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
18
+ import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
19
+ import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
20
+ import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
24
21
  import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
25
22
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
26
- import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
27
- import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
28
23
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
29
- import { ButtonBar } from 'vscode/vscode/vs/base/browser/ui/button/button';
30
24
  import { defaultButtonStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
31
- import { LRUCachedFunction, CachedFunction } from 'vscode/vscode/vs/base/common/cache';
32
- import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
25
+ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
26
+ import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
27
+ import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
28
+ import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
29
+ import { BulkFileOperationType, BulkEditPreviewProvider, BulkFileOperations } from './bulkEditPreview.js';
30
+ import { compareBulkFileOperations, BulkEditDataSource, BulkEditDelegate, TextEditElementRenderer, FileElementRenderer, CategoryElementRenderer, BulkEditAccessibilityProvider, BulkEditIdentityProvider, BulkEditNaviLabelProvider, BulkEditSorter, FileElement, CategoryElement, TextEditElement } from './bulkEditTree.js';
31
+ import { SIDE_GROUP, ACTIVE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
32
+ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
33
33
 
34
34
  var BulkEditPane_1;
35
- const _moduleId = "vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane";
36
35
  var State;
37
36
  ( ((function(State) {
38
37
  State["Data"] = "data";
@@ -45,7 +44,7 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
45
44
  static { this.ctxHasCategories = ( (new RawContextKey('refactorPreview.hasCategories', false))); }
46
45
  static { this.ctxGroupByFile = ( (new RawContextKey('refactorPreview.groupByFile', true))); }
47
46
  static { this.ctxHasCheckedChanges = ( (new RawContextKey('refactorPreview.hasCheckedChanges', true))); }
48
- static { this._memGroupByFile = `${BulkEditPane_1.ID}.groupByFile`; }
47
+ static { this._memGroupByFile = `${this.ID}.groupByFile`; }
49
48
  constructor(options, _instaService, _editorService, _labelService, _textModelService, _dialogService, _contextMenuService, _storageService, contextKeyService, viewDescriptorService, keybindingService, contextMenuService, configurationService, openerService, themeService, telemetryService, hoverService) {
50
49
  super({ ...options, titleMenuId: MenuId.BulkEditTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, _instaService, openerService, themeService, telemetryService, hoverService);
51
50
  this._instaService = _instaService;
@@ -65,7 +64,8 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
65
64
  if (fileOperation.type & BulkFileOperationType.Delete) {
66
65
  return {
67
66
  original: { resource: URI.revive(previewUri) },
68
- modified: { resource: undefined }
67
+ modified: { resource: undefined },
68
+ goToFileResource: fileOperation.uri,
69
69
  };
70
70
  }
71
71
  else {
@@ -79,7 +79,8 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
79
79
  }
80
80
  return {
81
81
  original: { resource: URI.revive(leftResource) },
82
- modified: { resource: URI.revive(previewUri) }
82
+ modified: { resource: URI.revive(previewUri) },
83
+ goToFileResource: leftResource,
83
84
  };
84
85
  }
85
86
  })));
@@ -137,16 +138,15 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
137
138
  const buttonBar = ( (new ButtonBar(buttonsContainer)));
138
139
  this._disposables.add(buttonBar);
139
140
  const btnConfirm = buttonBar.addButton({ supportIcons: true, ...defaultButtonStyles });
140
- btnConfirm.label = ( localizeWithPath(_moduleId, 0, 'Apply'));
141
+ btnConfirm.label = ( localize(5286, 'Apply'));
141
142
  btnConfirm.onDidClick(() => this.accept(), this, this._disposables);
142
143
  const btnCancel = buttonBar.addButton({ ...defaultButtonStyles, secondary: true });
143
- btnCancel.label = ( localizeWithPath(_moduleId, 1, 'Discard'));
144
+ btnCancel.label = ( localize(5287, 'Discard'));
144
145
  btnCancel.onDidClick(() => this.discard(), this, this._disposables);
145
146
  this._message = document.createElement('span');
146
147
  this._message.className = 'message';
147
- this._message.innerText = ( localizeWithPath(
148
- _moduleId,
149
- 2,
148
+ this._message.innerText = ( localize(
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);
@@ -220,17 +220,15 @@ let BulkEditPane = class BulkEditPane extends ViewPane {
220
220
  }
221
221
  let message;
222
222
  if (conflicts.length === 1) {
223
- message = ( localizeWithPath(
224
- _moduleId,
225
- 3,
223
+ message = ( localize(
224
+ 5289,
226
225
  "Cannot apply refactoring because '{0}' has changed in the meantime.",
227
226
  this._labelService.getUriLabel(conflicts[0], { relative: true })
228
227
  ));
229
228
  }
230
229
  else {
231
- message = ( localizeWithPath(
232
- _moduleId,
233
- 4,
230
+ message = ( localize(
231
+ 5290,
234
232
  "Cannot apply refactoring because {0} other files have changed in the meantime.",
235
233
  conflicts.length
236
234
  ));
@@ -13,7 +13,7 @@ import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.servi
13
13
  import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
14
14
  import { ConflictDetector } from '../conflicts.js';
15
15
  import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
16
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
16
+ import { localize } from 'vscode/vscode/vs/nls';
17
17
  import { extUri } from 'vscode/vscode/vs/base/common/resources';
18
18
  import { ResourceTextEdit, ResourceFileEdit } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
19
19
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
@@ -22,7 +22,6 @@ import { SnippetParser } from 'vscode/vscode/vs/editor/contrib/snippet/browser/s
22
22
  import { MicrotaskDelay } from 'vscode/vscode/vs/base/common/symbols';
23
23
 
24
24
  var BulkFileOperations_1, BulkEditPreviewProvider_1;
25
- const _moduleId = "vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview";
26
25
  class CheckedStates {
27
26
  constructor() {
28
27
  this._states = ( (new WeakMap()));
@@ -103,7 +102,7 @@ class BulkFileOperation {
103
102
  }
104
103
  class BulkCategory {
105
104
  static { this._defaultMetadata = ( (Object.freeze({
106
- label: ( localizeWithPath(_moduleId, 0, "Other")),
105
+ label: ( localize(9969, "Other")),
107
106
  icon: Codicon.symbolFile,
108
107
  needsConfirmation: false
109
108
  }))); }
@@ -291,7 +290,7 @@ BulkFileOperations = BulkFileOperations_1 = ( (__decorate([
291
290
  let BulkEditPreviewProvider = class BulkEditPreviewProvider {
292
291
  static { BulkEditPreviewProvider_1 = this; }
293
292
  static { this.Schema = 'vscode-bulkeditpreview-editor'; }
294
- static { this.emptyPreview = ( (URI.from({ scheme: BulkEditPreviewProvider_1.Schema, fragment: 'empty' }))); }
293
+ static { this.emptyPreview = ( (URI.from({ scheme: this.Schema, fragment: 'empty' }))); }
295
294
  static fromPreviewUri(uri) {
296
295
  return (
297
296
  (URI.parse(uri.query))
@@ -8,7 +8,7 @@ import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
8
8
  import { TextModel } from 'vscode/vscode/vs/editor/common/model/textModel';
9
9
  import { BulkFileOperationType, BulkFileOperations } from './bulkEditPreview.js';
10
10
  import { FileKind } from 'vscode/vscode/vs/platform/files/common/files';
11
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
11
+ import { localize } from 'vscode/vscode/vs/nls';
12
12
  import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
13
13
  import { IconLabel } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabel';
14
14
  import { basename } from 'vscode/vscode/vs/base/common/resources';
@@ -24,7 +24,6 @@ import { PLAINTEXT_LANGUAGE_ID } from 'vscode/vscode/vs/editor/common/languages/
24
24
  import { SnippetParser } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetParser';
25
25
 
26
26
  var CategoryElementRenderer_1, FileElementRenderer_1, TextEditElementRenderer_1;
27
- const _moduleId = "vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree";
28
27
  class CategoryElement {
29
28
  constructor(parent, category) {
30
29
  this.parent = parent;
@@ -255,7 +254,7 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
255
254
  this._labelService = _labelService;
256
255
  }
257
256
  getWidgetAriaLabel() {
258
- return ( localizeWithPath(_moduleId, 0, "Bulk Edit"));
257
+ return ( localize(9970, "Bulk Edit"));
259
258
  }
260
259
  getRole(_element) {
261
260
  return 'checkbox';
@@ -264,34 +263,30 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
264
263
  if (element instanceof FileElement) {
265
264
  if (element.edit.textEdits.length > 0) {
266
265
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
267
- return ( localizeWithPath(
268
- _moduleId,
269
- 1,
266
+ return ( localize(
267
+ 9971,
270
268
  "Renaming {0} to {1}, also making text edits",
271
269
  this._labelService.getUriLabel(element.edit.uri, { relative: true }),
272
270
  this._labelService.getUriLabel(element.edit.newUri, { relative: true })
273
271
  ));
274
272
  }
275
273
  else if (element.edit.type & BulkFileOperationType.Create) {
276
- return ( localizeWithPath(
277
- _moduleId,
278
- 2,
274
+ return ( localize(
275
+ 9972,
279
276
  "Creating {0}, also making text edits",
280
277
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
281
278
  ));
282
279
  }
283
280
  else if (element.edit.type & BulkFileOperationType.Delete) {
284
- return ( localizeWithPath(
285
- _moduleId,
286
- 3,
281
+ return ( localize(
282
+ 9973,
287
283
  "Deleting {0}, also making text edits",
288
284
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
289
285
  ));
290
286
  }
291
287
  else {
292
- return ( localizeWithPath(
293
- _moduleId,
294
- 4,
288
+ return ( localize(
289
+ 9974,
295
290
  "{0}, making text edits",
296
291
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
297
292
  ));
@@ -299,26 +294,23 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
299
294
  }
300
295
  else {
301
296
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
302
- return ( localizeWithPath(
303
- _moduleId,
304
- 5,
297
+ return ( localize(
298
+ 9975,
305
299
  "Renaming {0} to {1}",
306
300
  this._labelService.getUriLabel(element.edit.uri, { relative: true }),
307
301
  this._labelService.getUriLabel(element.edit.newUri, { relative: true })
308
302
  ));
309
303
  }
310
304
  else if (element.edit.type & BulkFileOperationType.Create) {
311
- return ( localizeWithPath(
312
- _moduleId,
313
- 6,
305
+ return ( localize(
306
+ 9976,
314
307
  "Creating {0}",
315
308
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
316
309
  ));
317
310
  }
318
311
  else if (element.edit.type & BulkFileOperationType.Delete) {
319
- return ( localizeWithPath(
320
- _moduleId,
321
- 7,
312
+ return ( localize(
313
+ 9977,
322
314
  "Deleting {0}",
323
315
  this._labelService.getUriLabel(element.edit.uri, { relative: true })
324
316
  ));
@@ -327,9 +319,8 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
327
319
  }
328
320
  if (element instanceof TextEditElement) {
329
321
  if (element.selecting.length > 0 && element.inserting.length > 0) {
330
- return ( localizeWithPath(
331
- _moduleId,
332
- 8,
322
+ return ( localize(
323
+ 9978,
333
324
  "line {0}, replacing {1} with {2}",
334
325
  element.edit.textEdit.textEdit.range.startLineNumber,
335
326
  element.selecting,
@@ -337,18 +328,16 @@ let BulkEditAccessibilityProvider = class BulkEditAccessibilityProvider {
337
328
  ));
338
329
  }
339
330
  else if (element.selecting.length > 0 && element.inserting.length === 0) {
340
- return ( localizeWithPath(
341
- _moduleId,
342
- 9,
331
+ return ( localize(
332
+ 9979,
343
333
  "line {0}, removing {1}",
344
334
  element.edit.textEdit.textEdit.range.startLineNumber,
345
335
  element.selecting
346
336
  ));
347
337
  }
348
338
  else if (element.selecting.length === 0 && element.inserting.length > 0) {
349
- return ( localizeWithPath(
350
- _moduleId,
351
- 10,
339
+ return ( localize(
340
+ 9980,
352
341
  "line {0}, inserting {1}",
353
342
  element.edit.textEdit.textEdit.range.startLineNumber,
354
343
  element.selecting
@@ -455,9 +444,8 @@ let FileElementTemplate = class FileElementTemplate {
455
444
  if (element.edit.type & BulkFileOperationType.Rename && element.edit.newUri) {
456
445
  this._label.setResource({
457
446
  resource: element.edit.uri,
458
- name: ( localizeWithPath(
459
- _moduleId,
460
- 11,
447
+ name: ( localize(
448
+ 9981,
461
449
  "{0} → {1}",
462
450
  this._labelService.getUriLabel(element.edit.uri, { relative: true }),
463
451
  this._labelService.getUriLabel(element.edit.newUri, { relative: true })
@@ -465,7 +453,7 @@ let FileElementTemplate = class FileElementTemplate {
465
453
  }, {
466
454
  fileDecorations: { colors: true, badges: false }
467
455
  });
468
- this._details.innerText = ( localizeWithPath(_moduleId, 12, "(renaming)"));
456
+ this._details.innerText = ( localize(9982, "(renaming)"));
469
457
  }
470
458
  else {
471
459
  const options = {
@@ -475,10 +463,10 @@ let FileElementTemplate = class FileElementTemplate {
475
463
  extraClasses: []
476
464
  };
477
465
  if (element.edit.type & BulkFileOperationType.Create) {
478
- this._details.innerText = ( localizeWithPath(_moduleId, 13, "(creating)"));
466
+ this._details.innerText = ( localize(9983, "(creating)"));
479
467
  }
480
468
  else if (element.edit.type & BulkFileOperationType.Delete) {
481
- this._details.innerText = ( localizeWithPath(_moduleId, 14, "(deleting)"));
469
+ this._details.innerText = ( localize(9984, "(deleting)"));
482
470
  options.extraClasses.push('delete');
483
471
  }
484
472
  else {
@@ -557,7 +545,7 @@ let TextEditElementTemplate = class TextEditElementTemplate {
557
545
  let title;
558
546
  const { metadata } = element.edit.textEdit;
559
547
  if (metadata && metadata.description) {
560
- title = ( localizeWithPath(_moduleId, 15, "{0} - {1}", metadata.label, metadata.description));
548
+ title = ( localize(9985, "{0} - {1}", metadata.label, metadata.description));
561
549
  }
562
550
  else if (metadata) {
563
551
  title = metadata.label;