@codingame/monaco-vscode-explorer-service-override 4.5.1 → 5.0.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.
@@ -19,6 +19,7 @@ import { IExplorerService } from 'vscode/vscode/vs/workbench/contrib/files/brows
19
19
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
20
20
  import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
21
21
 
22
+ const _moduleId = "vs/workbench/contrib/files/browser/fileActions.contribution";
22
23
  registerAction2(GlobalCompareResourcesAction);
23
24
  registerAction2(FocusFilesExplorer);
24
25
  registerAction2(ShowActiveFileInExplorer);
@@ -37,7 +38,11 @@ const RENAME_ID = 'renameFile';
37
38
  KeybindingsRegistry.registerCommandAndKeybindingRule({
38
39
  id: RENAME_ID,
39
40
  weight: 200 + explorerCommandsWeightBonus,
40
- when: ( ContextKeyExpr.and(FilesExplorerFocusCondition, ( ExplorerRootContext.toNegated()), ExplorerResourceNotReadonlyContext)),
41
+ when: ( (ContextKeyExpr.and(
42
+ FilesExplorerFocusCondition,
43
+ (ExplorerRootContext.toNegated()),
44
+ ExplorerResourceNotReadonlyContext
45
+ ))),
41
46
  primary: 60 ,
42
47
  mac: {
43
48
  primary: 3
@@ -48,11 +53,11 @@ const MOVE_FILE_TO_TRASH_ID = 'moveFileToTrash';
48
53
  KeybindingsRegistry.registerCommandAndKeybindingRule({
49
54
  id: MOVE_FILE_TO_TRASH_ID,
50
55
  weight: 200 + explorerCommandsWeightBonus,
51
- when: ( ContextKeyExpr.and(
56
+ when: ( (ContextKeyExpr.and(
52
57
  FilesExplorerFocusCondition,
53
58
  ExplorerResourceNotReadonlyContext,
54
59
  ExplorerResourceMoveableToTrash
55
- )),
60
+ ))),
56
61
  primary: 20 ,
57
62
  mac: {
58
63
  primary: 2048 | 1 ,
@@ -64,7 +69,7 @@ const DELETE_FILE_ID = 'deleteFile';
64
69
  KeybindingsRegistry.registerCommandAndKeybindingRule({
65
70
  id: DELETE_FILE_ID,
66
71
  weight: 200 + explorerCommandsWeightBonus,
67
- when: ( ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext)),
72
+ when: ( (ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext))),
68
73
  primary: 1024 | 20 ,
69
74
  mac: {
70
75
  primary: 2048 | 512 | 1
@@ -74,11 +79,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
74
79
  KeybindingsRegistry.registerCommandAndKeybindingRule({
75
80
  id: DELETE_FILE_ID,
76
81
  weight: 200 + explorerCommandsWeightBonus,
77
- when: ( ContextKeyExpr.and(
82
+ when: ( (ContextKeyExpr.and(
78
83
  FilesExplorerFocusCondition,
79
84
  ExplorerResourceNotReadonlyContext,
80
- ( ExplorerResourceMoveableToTrash.toNegated())
81
- )),
85
+ (ExplorerResourceMoveableToTrash.toNegated())
86
+ ))),
82
87
  primary: 20 ,
83
88
  mac: {
84
89
  primary: 2048 | 1
@@ -89,7 +94,11 @@ const CUT_FILE_ID = 'filesExplorer.cut';
89
94
  KeybindingsRegistry.registerCommandAndKeybindingRule({
90
95
  id: CUT_FILE_ID,
91
96
  weight: 200 + explorerCommandsWeightBonus,
92
- when: ( ContextKeyExpr.and(FilesExplorerFocusCondition, ( ExplorerRootContext.toNegated()), ExplorerResourceNotReadonlyContext)),
97
+ when: ( (ContextKeyExpr.and(
98
+ FilesExplorerFocusCondition,
99
+ (ExplorerRootContext.toNegated()),
100
+ ExplorerResourceNotReadonlyContext
101
+ ))),
93
102
  primary: 2048 | 54 ,
94
103
  handler: cutFileHandler,
95
104
  });
@@ -97,7 +106,10 @@ const COPY_FILE_ID = 'filesExplorer.copy';
97
106
  KeybindingsRegistry.registerCommandAndKeybindingRule({
98
107
  id: COPY_FILE_ID,
99
108
  weight: 200 + explorerCommandsWeightBonus,
100
- when: ( ContextKeyExpr.and(FilesExplorerFocusCondition, ( ExplorerRootContext.toNegated()))),
109
+ when: ( (ContextKeyExpr.and(
110
+ FilesExplorerFocusCondition,
111
+ (ExplorerRootContext.toNegated())
112
+ ))),
101
113
  primary: 2048 | 33 ,
102
114
  handler: copyFileHandler,
103
115
  });
@@ -106,13 +118,13 @@ CommandsRegistry.registerCommand(PASTE_FILE_ID, pasteFileHandler);
106
118
  KeybindingsRegistry.registerKeybindingRule({
107
119
  id: `^${PASTE_FILE_ID}`,
108
120
  weight: 200 + explorerCommandsWeightBonus,
109
- when: ( ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext)),
121
+ when: ( (ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext))),
110
122
  primary: 2048 | 52 ,
111
123
  });
112
124
  KeybindingsRegistry.registerCommandAndKeybindingRule({
113
125
  id: 'filesExplorer.cancelCut',
114
126
  weight: 200 + explorerCommandsWeightBonus,
115
- when: ( ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceCut)),
127
+ when: ( (ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceCut))),
116
128
  primary: 9 ,
117
129
  handler: async (accessor) => {
118
130
  const explorerService = accessor.get(IExplorerService);
@@ -122,33 +134,24 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
122
134
  KeybindingsRegistry.registerCommandAndKeybindingRule({
123
135
  id: 'filesExplorer.openFilePreserveFocus',
124
136
  weight: 200 + explorerCommandsWeightBonus,
125
- when: ( ContextKeyExpr.and(FilesExplorerFocusCondition, ( ExplorerFolderContext.toNegated()))),
137
+ when: ( (ContextKeyExpr.and(
138
+ FilesExplorerFocusCondition,
139
+ (ExplorerFolderContext.toNegated())
140
+ ))),
126
141
  primary: 10 ,
127
142
  handler: openFilePreserveFocusHandler
128
143
  });
129
144
  const copyPathCommand = {
130
145
  id: COPY_PATH_COMMAND_ID,
131
- title: ( localizeWithPath(
132
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
133
- 'copyPath',
134
- "Copy Path"
135
- ))
146
+ title: ( localizeWithPath(_moduleId, 0, "Copy Path"))
136
147
  };
137
148
  const copyRelativePathCommand = {
138
149
  id: COPY_RELATIVE_PATH_COMMAND_ID,
139
- title: ( localizeWithPath(
140
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
141
- 'copyRelativePath',
142
- "Copy Relative Path"
143
- ))
150
+ title: ( localizeWithPath(_moduleId, 1, "Copy Relative Path"))
144
151
  };
145
152
  appendEditorTitleContextMenuItem(COPY_PATH_COMMAND_ID, copyPathCommand.title, ResourceContextKey.IsFileSystemResource, '1_cutcopypaste');
146
153
  appendEditorTitleContextMenuItem(COPY_RELATIVE_PATH_COMMAND_ID, copyRelativePathCommand.title, ResourceContextKey.IsFileSystemResource, '1_cutcopypaste');
147
- appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, ( localizeWithPath(
148
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
149
- 'revealInSideBar',
150
- "Reveal in Explorer View"
151
- )), ResourceContextKey.IsFileSystemResource, '2_files', 1);
154
+ appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, ( localizeWithPath(_moduleId, 2, "Reveal in Explorer View")), ResourceContextKey.IsFileSystemResource, '2_files', 1);
152
155
  function appendEditorTitleContextMenuItem(id, title, when, group, order) {
153
156
  MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, {
154
157
  command: { id, title },
@@ -157,21 +160,13 @@ function appendEditorTitleContextMenuItem(id, title, when, group, order) {
157
160
  order
158
161
  });
159
162
  }
160
- appendSaveConflictEditorTitleAction('workbench.files.action.acceptLocalChanges', ( localizeWithPath(
161
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
162
- 'acceptLocalChanges',
163
- "Use your changes and overwrite file contents"
164
- )), Codicon.check, -10, acceptLocalChangesCommand);
165
- appendSaveConflictEditorTitleAction('workbench.files.action.revertLocalChanges', ( localizeWithPath(
166
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
167
- 'revertLocalChanges',
168
- "Discard your changes and revert to file contents"
169
- )), Codicon.discard, -9, revertLocalChangesCommand);
163
+ appendSaveConflictEditorTitleAction('workbench.files.action.acceptLocalChanges', ( localizeWithPath(_moduleId, 3, "Use your changes and overwrite file contents")), Codicon.check, -10, acceptLocalChangesCommand);
164
+ appendSaveConflictEditorTitleAction('workbench.files.action.revertLocalChanges', ( localizeWithPath(_moduleId, 4, "Discard your changes and revert to file contents")), Codicon.discard, -9, revertLocalChangesCommand);
170
165
  function appendSaveConflictEditorTitleAction(id, title, icon, order, command) {
171
166
  CommandsRegistry.registerCommand(id, command);
172
167
  MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
173
168
  command: { id, title, icon },
174
- when: ( ContextKeyExpr.equals(CONFLICT_RESOLUTION_CONTEXT, true)),
169
+ when: ( (ContextKeyExpr.equals(CONFLICT_RESOLUTION_CONTEXT, true))),
175
170
  group: 'navigation',
176
171
  order
177
172
  });
@@ -189,20 +184,12 @@ function appendToCommandPalette({ id, title, category, metadata }, when) {
189
184
  }
190
185
  appendToCommandPalette({
191
186
  id: COPY_PATH_COMMAND_ID,
192
- title: ( localize2WithPath(
193
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
194
- 'copyPathOfActive',
195
- "Copy Path of Active File"
196
- )),
187
+ title: ( localize2WithPath(_moduleId, 5, "Copy Path of Active File")),
197
188
  category: Categories.File
198
189
  });
199
190
  appendToCommandPalette({
200
191
  id: COPY_RELATIVE_PATH_COMMAND_ID,
201
- title: ( localize2WithPath(
202
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
203
- 'copyRelativePathOfActive',
204
- "Copy Relative Path of Active File"
205
- )),
192
+ title: ( localize2WithPath(_moduleId, 6, "Copy Relative Path of Active File")),
206
193
  category: Categories.File
207
194
  });
208
195
  appendToCommandPalette({
@@ -217,39 +204,30 @@ appendToCommandPalette({
217
204
  });
218
205
  appendToCommandPalette({
219
206
  id: SAVE_ALL_IN_GROUP_COMMAND_ID,
220
- title: ( localize2WithPath(
221
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
222
- 'saveAllInGroup',
223
- "Save All in Group"
224
- )),
207
+ title: ( localize2WithPath(_moduleId, 7, "Save All in Group")),
225
208
  category: Categories.File
226
209
  });
227
210
  appendToCommandPalette({
228
211
  id: SAVE_FILES_COMMAND_ID,
229
- title: ( localize2WithPath(
230
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
231
- 'saveFiles',
232
- "Save All Files"
233
- )),
212
+ title: ( localize2WithPath(_moduleId, 8, "Save All Files")),
234
213
  category: Categories.File
235
214
  });
236
215
  appendToCommandPalette({
237
216
  id: REVERT_FILE_COMMAND_ID,
238
- title: ( localize2WithPath(
239
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
240
- 'revert',
241
- "Revert File"
242
- )),
217
+ title: ( localize2WithPath(_moduleId, 9, "Revert File")),
243
218
  category: Categories.File
244
219
  });
245
220
  appendToCommandPalette({
246
221
  id: COMPARE_WITH_SAVED_COMMAND_ID,
247
- title: ( localize2WithPath(
248
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
249
- 'compareActiveWithSaved',
250
- "Compare Active File with Saved"
251
- )),
252
- category: Categories.File
222
+ title: ( localize2WithPath(_moduleId, 10, "Compare Active File with Saved")),
223
+ category: Categories.File,
224
+ metadata: {
225
+ description: ( localize2WithPath(
226
+ _moduleId,
227
+ 11,
228
+ "Opens a new diff editor to compare the active file with the version on disk."
229
+ ))
230
+ }
253
231
  });
254
232
  appendToCommandPalette({
255
233
  id: SAVE_FILE_AS_COMMAND_ID,
@@ -260,30 +238,25 @@ appendToCommandPalette({
260
238
  id: NEW_FILE_COMMAND_ID,
261
239
  title: NEW_FILE_LABEL,
262
240
  category: Categories.File
263
- }, ( WorkspaceFolderCountContext.notEqualsTo('0')));
241
+ }, ( (WorkspaceFolderCountContext.notEqualsTo('0'))));
264
242
  appendToCommandPalette({
265
243
  id: NEW_FOLDER_COMMAND_ID,
266
244
  title: NEW_FOLDER_LABEL,
267
245
  category: Categories.File,
268
- metadata: { description: ( localize2WithPath(
269
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
270
- 'newFolderDescription',
271
- "Create a new folder or directory"
272
- )) }
273
- }, ( WorkspaceFolderCountContext.notEqualsTo('0')));
246
+ metadata: { description: ( localize2WithPath(_moduleId, 12, "Create a new folder or directory")) }
247
+ }, ( (WorkspaceFolderCountContext.notEqualsTo('0'))));
274
248
  appendToCommandPalette({
275
249
  id: NEW_UNTITLED_FILE_COMMAND_ID,
276
250
  title: NEW_UNTITLED_FILE_LABEL,
277
251
  category: Categories.File
278
252
  });
279
- const isFileOrUntitledResourceContextKey = ( ContextKeyExpr.or(ResourceContextKey.IsFileSystemResource, ( ResourceContextKey.Scheme.isEqualTo(Schemas.untitled))));
253
+ const isFileOrUntitledResourceContextKey = ( (ContextKeyExpr.or(
254
+ ResourceContextKey.IsFileSystemResource,
255
+ (ResourceContextKey.Scheme.isEqualTo(Schemas.untitled))
256
+ )));
280
257
  const openToSideCommand = {
281
258
  id: OPEN_TO_SIDE_COMMAND_ID,
282
- title: ( localizeWithPath(
283
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
284
- 'openToSide',
285
- "Open to the Side"
286
- ))
259
+ title: ( localizeWithPath(_moduleId, 13, "Open to the Side"))
287
260
  };
288
261
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
289
262
  group: 'navigation',
@@ -296,11 +269,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
296
269
  order: 10,
297
270
  command: {
298
271
  id: REOPEN_WITH_COMMAND_ID,
299
- title: ( localizeWithPath(
300
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
301
- 'reopenWith',
302
- "Reopen Editor With..."
303
- ))
272
+ title: ( localizeWithPath(_moduleId, 14, "Reopen Editor With..."))
304
273
  },
305
274
  when: ActiveEditorAvailableEditorIdsContext
306
275
  });
@@ -324,41 +293,33 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
324
293
  title: SAVE_FILE_LABEL,
325
294
  precondition: OpenEditorsDirtyEditorContext
326
295
  },
327
- when: ( ContextKeyExpr.or((
328
- ResourceContextKey.Scheme.isEqualTo(Schemas.untitled)), (
329
- ContextKeyExpr.and((
330
- OpenEditorsGroupContext.toNegated()), (
331
- OpenEditorsReadonlyEditorContext.toNegated()), (
332
- AutoSaveAfterShortDelayContext.toNegated())))))
296
+ when: ( (ContextKeyExpr.or(
297
+ (ResourceContextKey.Scheme.isEqualTo(Schemas.untitled)),
298
+ (ContextKeyExpr.and(
299
+ (OpenEditorsGroupContext.toNegated()),
300
+ (OpenEditorsReadonlyEditorContext.toNegated()),
301
+ (AutoSaveAfterShortDelayContext.toNegated()))))))
333
302
  });
334
303
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
335
304
  group: '2_save',
336
305
  order: 20,
337
306
  command: {
338
307
  id: REVERT_FILE_COMMAND_ID,
339
- title: ( localizeWithPath(
340
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
341
- 'revert',
342
- "Revert File"
343
- )),
308
+ title: ( localizeWithPath(_moduleId, 9, "Revert File")),
344
309
  precondition: OpenEditorsDirtyEditorContext
345
310
  },
346
- when: ( ContextKeyExpr.and((
347
- OpenEditorsGroupContext.toNegated()), (
348
- OpenEditorsReadonlyEditorContext.toNegated()), (
349
- ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)), (
350
- AutoSaveAfterShortDelayContext.toNegated())))
311
+ when: ( (ContextKeyExpr.and(
312
+ (OpenEditorsGroupContext.toNegated()),
313
+ (OpenEditorsReadonlyEditorContext.toNegated()),
314
+ (ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)),
315
+ (AutoSaveAfterShortDelayContext.toNegated()))))
351
316
  });
352
317
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
353
318
  group: '2_save',
354
319
  order: 30,
355
320
  command: {
356
321
  id: SAVE_ALL_IN_GROUP_COMMAND_ID,
357
- title: ( localizeWithPath(
358
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
359
- 'saveAll',
360
- "Save All"
361
- )),
322
+ title: ( localizeWithPath(_moduleId, 15, "Save All")),
362
323
  precondition: DirtyWorkingCopiesContext
363
324
  },
364
325
  when: OpenEditorsGroupContext
@@ -368,106 +329,82 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
368
329
  order: 10,
369
330
  command: {
370
331
  id: COMPARE_WITH_SAVED_COMMAND_ID,
371
- title: ( localizeWithPath(
372
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
373
- 'compareWithSaved',
374
- "Compare with Saved"
375
- )),
332
+ title: ( localizeWithPath(_moduleId, 16, "Compare with Saved")),
376
333
  precondition: OpenEditorsDirtyEditorContext
377
334
  },
378
- when: ( ContextKeyExpr.and(ResourceContextKey.IsFileSystemResource, ( AutoSaveAfterShortDelayContext.toNegated()), ( WorkbenchListDoubleSelection.toNegated())))
335
+ when: ( (ContextKeyExpr.and(
336
+ ResourceContextKey.IsFileSystemResource,
337
+ (AutoSaveAfterShortDelayContext.toNegated()),
338
+ (WorkbenchListDoubleSelection.toNegated())
339
+ )))
379
340
  });
380
341
  const compareResourceCommand = {
381
342
  id: COMPARE_RESOURCE_COMMAND_ID,
382
- title: ( localizeWithPath(
383
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
384
- 'compareWithSelected',
385
- "Compare with Selected"
386
- ))
343
+ title: ( localizeWithPath(_moduleId, 17, "Compare with Selected"))
387
344
  };
388
345
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
389
346
  group: '3_compare',
390
347
  order: 20,
391
348
  command: compareResourceCommand,
392
- when: ( ContextKeyExpr.and(
349
+ when: ( (ContextKeyExpr.and(
393
350
  ResourceContextKey.HasResource,
394
351
  ResourceSelectedForCompareContext,
395
352
  isFileOrUntitledResourceContextKey,
396
- ( WorkbenchListDoubleSelection.toNegated())
397
- ))
353
+ (WorkbenchListDoubleSelection.toNegated())
354
+ )))
398
355
  });
399
356
  const selectForCompareCommand = {
400
357
  id: SELECT_FOR_COMPARE_COMMAND_ID,
401
- title: ( localizeWithPath(
402
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
403
- 'compareSource',
404
- "Select for Compare"
405
- ))
358
+ title: ( localizeWithPath(_moduleId, 18, "Select for Compare"))
406
359
  };
407
360
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
408
361
  group: '3_compare',
409
362
  order: 30,
410
363
  command: selectForCompareCommand,
411
- when: ( ContextKeyExpr.and(
364
+ when: ( (ContextKeyExpr.and(
412
365
  ResourceContextKey.HasResource,
413
366
  isFileOrUntitledResourceContextKey,
414
- ( WorkbenchListDoubleSelection.toNegated())
415
- ))
367
+ (WorkbenchListDoubleSelection.toNegated())
368
+ )))
416
369
  });
417
370
  const compareSelectedCommand = {
418
371
  id: COMPARE_SELECTED_COMMAND_ID,
419
- title: ( localizeWithPath(
420
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
421
- 'compareSelected',
422
- "Compare Selected"
423
- ))
372
+ title: ( localizeWithPath(_moduleId, 19, "Compare Selected"))
424
373
  };
425
374
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
426
375
  group: '3_compare',
427
376
  order: 30,
428
377
  command: compareSelectedCommand,
429
- when: ( ContextKeyExpr.and(
378
+ when: ( (ContextKeyExpr.and(
430
379
  ResourceContextKey.HasResource,
431
380
  WorkbenchListDoubleSelection,
432
381
  isFileOrUntitledResourceContextKey
433
- ))
382
+ )))
434
383
  });
435
384
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
436
385
  group: '4_close',
437
386
  order: 10,
438
387
  command: {
439
388
  id: CLOSE_EDITOR_COMMAND_ID,
440
- title: ( localizeWithPath(
441
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
442
- 'close',
443
- "Close"
444
- ))
389
+ title: ( localizeWithPath(_moduleId, 20, "Close"))
445
390
  },
446
- when: ( OpenEditorsGroupContext.toNegated())
391
+ when: ( (OpenEditorsGroupContext.toNegated()))
447
392
  });
448
393
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
449
394
  group: '4_close',
450
395
  order: 20,
451
396
  command: {
452
397
  id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,
453
- title: ( localizeWithPath(
454
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
455
- 'closeOthers',
456
- "Close Others"
457
- ))
398
+ title: ( localizeWithPath(_moduleId, 21, "Close Others"))
458
399
  },
459
- when: ( OpenEditorsGroupContext.toNegated())
400
+ when: ( (OpenEditorsGroupContext.toNegated()))
460
401
  });
461
402
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
462
403
  group: '4_close',
463
404
  order: 30,
464
405
  command: {
465
406
  id: CLOSE_SAVED_EDITORS_COMMAND_ID,
466
- title: ( localizeWithPath(
467
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
468
- 'closeSaved',
469
- "Close Saved"
470
- ))
407
+ title: ( localizeWithPath(_moduleId, 22, "Close Saved"))
471
408
  }
472
409
  });
473
410
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
@@ -475,11 +412,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
475
412
  order: 40,
476
413
  command: {
477
414
  id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
478
- title: ( localizeWithPath(
479
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
480
- 'closeAll',
481
- "Close All"
482
- ))
415
+ title: ( localizeWithPath(_moduleId, 23, "Close All"))
483
416
  }
484
417
  });
485
418
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
@@ -506,51 +439,65 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
506
439
  group: 'navigation',
507
440
  order: 10,
508
441
  command: openToSideCommand,
509
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource))
442
+ when: ( (ContextKeyExpr.and(
443
+ (ExplorerFolderContext.toNegated()),
444
+ ResourceContextKey.HasResource
445
+ )))
510
446
  });
511
447
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
512
448
  group: 'navigation',
513
449
  order: 20,
514
450
  command: {
515
451
  id: OPEN_WITH_EXPLORER_COMMAND_ID,
516
- title: ( localizeWithPath(
517
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
518
- 'explorerOpenWith',
519
- "Open With..."
520
- )),
452
+ title: ( localizeWithPath(_moduleId, 24, "Open With...")),
521
453
  },
522
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ExplorerResourceAvailableEditorIdsContext)),
454
+ when: ( (ContextKeyExpr.and(
455
+ (ExplorerFolderContext.toNegated()),
456
+ ExplorerResourceAvailableEditorIdsContext
457
+ ))),
523
458
  });
524
459
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
525
460
  group: '3_compare',
526
461
  order: 20,
527
462
  command: compareResourceCommand,
528
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, ResourceSelectedForCompareContext, ( WorkbenchListDoubleSelection.toNegated())))
463
+ when: ( (ContextKeyExpr.and(
464
+ (ExplorerFolderContext.toNegated()),
465
+ ResourceContextKey.HasResource,
466
+ ResourceSelectedForCompareContext,
467
+ (WorkbenchListDoubleSelection.toNegated())
468
+ )))
529
469
  });
530
470
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
531
471
  group: '3_compare',
532
472
  order: 30,
533
473
  command: selectForCompareCommand,
534
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, ( WorkbenchListDoubleSelection.toNegated())))
474
+ when: ( (ContextKeyExpr.and(
475
+ (ExplorerFolderContext.toNegated()),
476
+ ResourceContextKey.HasResource,
477
+ (WorkbenchListDoubleSelection.toNegated())
478
+ )))
535
479
  });
536
480
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
537
481
  group: '3_compare',
538
482
  order: 30,
539
483
  command: compareSelectedCommand,
540
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, WorkbenchListDoubleSelection))
484
+ when: ( (ContextKeyExpr.and(
485
+ (ExplorerFolderContext.toNegated()),
486
+ ResourceContextKey.HasResource,
487
+ WorkbenchListDoubleSelection
488
+ )))
541
489
  });
542
490
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
543
491
  group: '5_cutcopypaste',
544
492
  order: 8,
545
493
  command: {
546
494
  id: CUT_FILE_ID,
547
- title: ( localizeWithPath(
548
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
549
- 'cut',
550
- "Cut"
551
- ))
495
+ title: ( localizeWithPath(_moduleId, 25, "Cut"))
552
496
  },
553
- when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ExplorerResourceNotReadonlyContext))
497
+ when: ( (ContextKeyExpr.and(
498
+ (ExplorerRootContext.toNegated()),
499
+ ExplorerResourceNotReadonlyContext
500
+ )))
554
501
  });
555
502
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
556
503
  group: '5_cutcopypaste',
@@ -559,7 +506,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
559
506
  id: COPY_FILE_ID,
560
507
  title: COPY_FILE_LABEL
561
508
  },
562
- when: ( ExplorerRootContext.toNegated())
509
+ when: ( (ExplorerRootContext.toNegated()))
563
510
  });
564
511
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
565
512
  group: '5_cutcopypaste',
@@ -567,7 +514,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
567
514
  command: {
568
515
  id: PASTE_FILE_ID,
569
516
  title: PASTE_FILE_LABEL,
570
- precondition: ( ContextKeyExpr.and(ExplorerResourceNotReadonlyContext, FileCopiedContext))
517
+ precondition: ( (ContextKeyExpr.and(ExplorerResourceNotReadonlyContext, FileCopiedContext)))
571
518
  },
572
519
  when: ExplorerFolderContext
573
520
  });
@@ -578,10 +525,17 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
578
525
  id: DOWNLOAD_COMMAND_ID,
579
526
  title: DOWNLOAD_LABEL
580
527
  },
581
- when: ( ContextKeyExpr.or((
582
- ContextKeyExpr.and(( IsWebContext.toNegated()), ( ResourceContextKey.Scheme.notEqualsTo(Schemas.file)))), (
583
- ContextKeyExpr.and(IsWebContext, ( ExplorerFolderContext.toNegated()), ( ExplorerRootContext.toNegated()))), (
584
- ContextKeyExpr.and(IsWebContext, HasWebFileSystemAccess))))
528
+ when: ( (ContextKeyExpr.or(
529
+ (ContextKeyExpr.and(
530
+ (IsWebContext.toNegated()),
531
+ (ResourceContextKey.Scheme.notEqualsTo(Schemas.file))
532
+ )),
533
+ (ContextKeyExpr.and(
534
+ IsWebContext,
535
+ (ExplorerFolderContext.toNegated()),
536
+ (ExplorerRootContext.toNegated())
537
+ )),
538
+ (ContextKeyExpr.and(IsWebContext, HasWebFileSystemAccess)))))
585
539
  }));
586
540
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
587
541
  group: '5b_importexport',
@@ -590,10 +544,10 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
590
544
  id: UPLOAD_COMMAND_ID,
591
545
  title: UPLOAD_LABEL,
592
546
  },
593
- when: ( ContextKeyExpr.and(
547
+ when: ( (ContextKeyExpr.and(
594
548
  IsWebContext,
595
549
  ExplorerFolderContext,
596
- ExplorerResourceNotReadonlyContext))
550
+ ExplorerResourceNotReadonlyContext)))
597
551
  }));
598
552
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
599
553
  group: '6_copypath',
@@ -614,7 +568,10 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
614
568
  id: ADD_ROOT_FOLDER_COMMAND_ID,
615
569
  title: ADD_ROOT_FOLDER_LABEL
616
570
  },
617
- when: ( ContextKeyExpr.and(ExplorerRootContext, ( ContextKeyExpr.or(EnterMultiRootWorkspaceSupportContext, ( WorkbenchStateContext.isEqualTo('workspace'))))))
571
+ when: ( (ContextKeyExpr.and(ExplorerRootContext, (ContextKeyExpr.or(
572
+ EnterMultiRootWorkspaceSupportContext,
573
+ (WorkbenchStateContext.isEqualTo('workspace'))
574
+ )))))
618
575
  });
619
576
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
620
577
  group: '2_workspace',
@@ -623,7 +580,17 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
623
580
  id: REMOVE_ROOT_FOLDER_COMMAND_ID,
624
581
  title: REMOVE_ROOT_FOLDER_LABEL
625
582
  },
626
- when: ( ContextKeyExpr.and(ExplorerRootContext, ExplorerFolderContext, ( ContextKeyExpr.and(( WorkspaceFolderCountContext.notEqualsTo('0')), ( ContextKeyExpr.or(EnterMultiRootWorkspaceSupportContext, ( WorkbenchStateContext.isEqualTo('workspace'))))))))
583
+ when: ( (ContextKeyExpr.and(
584
+ ExplorerRootContext,
585
+ ExplorerFolderContext,
586
+ (ContextKeyExpr.and(
587
+ (WorkspaceFolderCountContext.notEqualsTo('0')),
588
+ (ContextKeyExpr.or(
589
+ EnterMultiRootWorkspaceSupportContext,
590
+ (WorkbenchStateContext.isEqualTo('workspace'))
591
+ ))
592
+ ))
593
+ )))
627
594
  });
628
595
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
629
596
  group: '7_modification',
@@ -633,7 +600,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
633
600
  title: TRIGGER_RENAME_LABEL,
634
601
  precondition: ExplorerResourceNotReadonlyContext
635
602
  },
636
- when: ( ExplorerRootContext.toNegated())
603
+ when: ( (ExplorerRootContext.toNegated()))
637
604
  });
638
605
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
639
606
  group: '7_modification',
@@ -645,50 +612,36 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
645
612
  },
646
613
  alt: {
647
614
  id: DELETE_FILE_ID,
648
- title: ( localizeWithPath(
649
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
650
- 'deleteFile',
651
- "Delete Permanently"
652
- )),
615
+ title: ( localizeWithPath(_moduleId, 26, "Delete Permanently")),
653
616
  precondition: ExplorerResourceNotReadonlyContext
654
617
  },
655
- when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ExplorerResourceMoveableToTrash))
618
+ when: ( (ContextKeyExpr.and(
619
+ (ExplorerRootContext.toNegated()),
620
+ ExplorerResourceMoveableToTrash
621
+ )))
656
622
  });
657
623
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
658
624
  group: '7_modification',
659
625
  order: 20,
660
626
  command: {
661
627
  id: DELETE_FILE_ID,
662
- title: ( localizeWithPath(
663
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
664
- 'deleteFile',
665
- "Delete Permanently"
666
- )),
628
+ title: ( localizeWithPath(_moduleId, 26, "Delete Permanently")),
667
629
  precondition: ExplorerResourceNotReadonlyContext
668
630
  },
669
- when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ( ExplorerResourceMoveableToTrash.toNegated())))
631
+ when: ( (ContextKeyExpr.and(
632
+ (ExplorerRootContext.toNegated()),
633
+ (ExplorerResourceMoveableToTrash.toNegated())
634
+ )))
670
635
  });
671
636
  for (const menuId of [MenuId.EmptyEditorGroupContext, MenuId.EditorTabsBarContext]) {
672
- MenuRegistry.appendMenuItem(menuId, { command: { id: NEW_UNTITLED_FILE_COMMAND_ID, title: ( localizeWithPath(
673
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
674
- 'newFile',
675
- "New Text File"
676
- )) }, group: '1_file', order: 10 });
677
- MenuRegistry.appendMenuItem(menuId, { command: { id: 'workbench.action.quickOpen', title: ( localizeWithPath(
678
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
679
- 'openFile',
680
- "Open File..."
681
- )) }, group: '1_file', order: 20 });
637
+ MenuRegistry.appendMenuItem(menuId, { command: { id: NEW_UNTITLED_FILE_COMMAND_ID, title: ( localizeWithPath(_moduleId, 27, "New Text File")) }, group: '1_file', order: 10 });
638
+ MenuRegistry.appendMenuItem(menuId, { command: { id: 'workbench.action.quickOpen', title: ( localizeWithPath(_moduleId, 28, "Open File...")) }, group: '1_file', order: 20 });
682
639
  }
683
640
  MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
684
641
  group: '1_new',
685
642
  command: {
686
643
  id: NEW_UNTITLED_FILE_COMMAND_ID,
687
- title: ( localizeWithPath(
688
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
689
- { key: 'miNewFile', comment: ['&& denotes a mnemonic'] },
690
- "&&New Text File"
691
- ))
644
+ title: ( localizeWithPath(_moduleId, 29, "&&New Text File"))
692
645
  },
693
646
  order: 1
694
647
  });
@@ -696,12 +649,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
696
649
  group: '4_save',
697
650
  command: {
698
651
  id: SAVE_FILE_COMMAND_ID,
699
- title: ( localizeWithPath(
700
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
701
- { key: 'miSave', comment: ['&& denotes a mnemonic'] },
702
- "&&Save"
703
- )),
704
- precondition: ( ContextKeyExpr.or(ActiveEditorContext, ( ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))))
652
+ title: ( localizeWithPath(_moduleId, 30, "&&Save")),
653
+ precondition: ( (ContextKeyExpr.or(
654
+ ActiveEditorContext,
655
+ (ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))
656
+ )))
705
657
  },
706
658
  order: 1
707
659
  });
@@ -709,12 +661,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
709
661
  group: '4_save',
710
662
  command: {
711
663
  id: SAVE_FILE_AS_COMMAND_ID,
712
- title: ( localizeWithPath(
713
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
714
- { key: 'miSaveAs', comment: ['&& denotes a mnemonic'] },
715
- "Save &&As..."
716
- )),
717
- precondition: ( ContextKeyExpr.or(ActiveEditorContext, ( ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))))
664
+ title: ( localizeWithPath(_moduleId, 31, "Save &&As...")),
665
+ precondition: ( (ContextKeyExpr.or(
666
+ ActiveEditorContext,
667
+ (ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))
668
+ )))
718
669
  },
719
670
  order: 2
720
671
  });
@@ -722,11 +673,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
722
673
  group: '4_save',
723
674
  command: {
724
675
  id: SAVE_ALL_COMMAND_ID,
725
- title: ( localizeWithPath(
726
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
727
- { key: 'miSaveAll', comment: ['&& denotes a mnemonic'] },
728
- "Save A&&ll"
729
- )),
676
+ title: ( localizeWithPath(_moduleId, 32, "Save A&&ll")),
730
677
  precondition: DirtyWorkingCopiesContext
731
678
  },
732
679
  order: 3
@@ -735,12 +682,8 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
735
682
  group: '5_autosave',
736
683
  command: {
737
684
  id: ToggleAutoSaveAction.ID,
738
- title: ( localizeWithPath(
739
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
740
- { key: 'miAutoSave', comment: ['&& denotes a mnemonic'] },
741
- "A&&uto Save"
742
- )),
743
- toggled: ( ContextKeyExpr.notEquals('config.files.autoSave', 'off'))
685
+ title: ( localizeWithPath(_moduleId, 33, "A&&uto Save")),
686
+ toggled: ( (ContextKeyExpr.notEquals('config.files.autoSave', 'off')))
744
687
  },
745
688
  order: 1
746
689
  });
@@ -748,14 +691,14 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
748
691
  group: '6_close',
749
692
  command: {
750
693
  id: REVERT_FILE_COMMAND_ID,
751
- title: ( localizeWithPath(
752
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
753
- { key: 'miRevert', comment: ['&& denotes a mnemonic'] },
754
- "Re&&vert File"
755
- )),
756
- precondition: ( ContextKeyExpr.or((
757
- ContextKeyExpr.and(ActiveEditorCanRevertContext)), (
758
- ContextKeyExpr.and(( ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)), FoldersViewVisibleContext, SidebarFocusContext)))),
694
+ title: ( localizeWithPath(_moduleId, 34, "Re&&vert File")),
695
+ precondition: ( (ContextKeyExpr.or(
696
+ (ContextKeyExpr.and(ActiveEditorCanRevertContext)),
697
+ (ContextKeyExpr.and(
698
+ (ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)),
699
+ FoldersViewVisibleContext,
700
+ SidebarFocusContext
701
+ ))))),
759
702
  },
760
703
  order: 1
761
704
  });
@@ -763,12 +706,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
763
706
  group: '6_close',
764
707
  command: {
765
708
  id: CLOSE_EDITOR_COMMAND_ID,
766
- title: ( localizeWithPath(
767
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
768
- { key: 'miCloseEditor', comment: ['&& denotes a mnemonic'] },
769
- "&&Close Editor"
770
- )),
771
- precondition: ( ContextKeyExpr.or(ActiveEditorContext, ( ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))))
709
+ title: ( localizeWithPath(_moduleId, 35, "&&Close Editor")),
710
+ precondition: ( (ContextKeyExpr.or(
711
+ ActiveEditorContext,
712
+ (ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))
713
+ )))
772
714
  },
773
715
  order: 2
774
716
  });
@@ -776,11 +718,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
776
718
  group: '3_global_nav',
777
719
  command: {
778
720
  id: 'workbench.action.quickOpen',
779
- title: ( localizeWithPath(
780
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
781
- { key: 'miGotoFile', comment: ['&& denotes a mnemonic'] },
782
- "Go to &&File..."
783
- ))
721
+ title: ( localizeWithPath(_moduleId, 36, "Go to &&File..."))
784
722
  },
785
723
  order: 1
786
724
  });