@codingame/monaco-vscode-explorer-service-override 4.5.0 → 4.5.2

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,38 +204,22 @@ 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
- )),
222
+ title: ( localize2WithPath(_moduleId, 10, "Compare Active File with Saved")),
252
223
  category: Categories.File
253
224
  });
254
225
  appendToCommandPalette({
@@ -260,30 +231,25 @@ appendToCommandPalette({
260
231
  id: NEW_FILE_COMMAND_ID,
261
232
  title: NEW_FILE_LABEL,
262
233
  category: Categories.File
263
- }, ( WorkspaceFolderCountContext.notEqualsTo('0')));
234
+ }, ( (WorkspaceFolderCountContext.notEqualsTo('0'))));
264
235
  appendToCommandPalette({
265
236
  id: NEW_FOLDER_COMMAND_ID,
266
237
  title: NEW_FOLDER_LABEL,
267
238
  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')));
239
+ metadata: { description: ( localize2WithPath(_moduleId, 11, "Create a new folder or directory")) }
240
+ }, ( (WorkspaceFolderCountContext.notEqualsTo('0'))));
274
241
  appendToCommandPalette({
275
242
  id: NEW_UNTITLED_FILE_COMMAND_ID,
276
243
  title: NEW_UNTITLED_FILE_LABEL,
277
244
  category: Categories.File
278
245
  });
279
- const isFileOrUntitledResourceContextKey = ( ContextKeyExpr.or(ResourceContextKey.IsFileSystemResource, ( ResourceContextKey.Scheme.isEqualTo(Schemas.untitled))));
246
+ const isFileOrUntitledResourceContextKey = ( (ContextKeyExpr.or(
247
+ ResourceContextKey.IsFileSystemResource,
248
+ (ResourceContextKey.Scheme.isEqualTo(Schemas.untitled))
249
+ )));
280
250
  const openToSideCommand = {
281
251
  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
- ))
252
+ title: ( localizeWithPath(_moduleId, 12, "Open to the Side"))
287
253
  };
288
254
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
289
255
  group: 'navigation',
@@ -296,11 +262,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
296
262
  order: 10,
297
263
  command: {
298
264
  id: REOPEN_WITH_COMMAND_ID,
299
- title: ( localizeWithPath(
300
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
301
- 'reopenWith',
302
- "Reopen Editor With..."
303
- ))
265
+ title: ( localizeWithPath(_moduleId, 13, "Reopen Editor With..."))
304
266
  },
305
267
  when: ActiveEditorAvailableEditorIdsContext
306
268
  });
@@ -324,41 +286,33 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
324
286
  title: SAVE_FILE_LABEL,
325
287
  precondition: OpenEditorsDirtyEditorContext
326
288
  },
327
- when: ( ContextKeyExpr.or((
328
- ResourceContextKey.Scheme.isEqualTo(Schemas.untitled)), (
329
- ContextKeyExpr.and((
330
- OpenEditorsGroupContext.toNegated()), (
331
- OpenEditorsReadonlyEditorContext.toNegated()), (
332
- AutoSaveAfterShortDelayContext.toNegated())))))
289
+ when: ( (ContextKeyExpr.or(
290
+ (ResourceContextKey.Scheme.isEqualTo(Schemas.untitled)),
291
+ (ContextKeyExpr.and(
292
+ (OpenEditorsGroupContext.toNegated()),
293
+ (OpenEditorsReadonlyEditorContext.toNegated()),
294
+ (AutoSaveAfterShortDelayContext.toNegated()))))))
333
295
  });
334
296
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
335
297
  group: '2_save',
336
298
  order: 20,
337
299
  command: {
338
300
  id: REVERT_FILE_COMMAND_ID,
339
- title: ( localizeWithPath(
340
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
341
- 'revert',
342
- "Revert File"
343
- )),
301
+ title: ( localizeWithPath(_moduleId, 9, "Revert File")),
344
302
  precondition: OpenEditorsDirtyEditorContext
345
303
  },
346
- when: ( ContextKeyExpr.and((
347
- OpenEditorsGroupContext.toNegated()), (
348
- OpenEditorsReadonlyEditorContext.toNegated()), (
349
- ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)), (
350
- AutoSaveAfterShortDelayContext.toNegated())))
304
+ when: ( (ContextKeyExpr.and(
305
+ (OpenEditorsGroupContext.toNegated()),
306
+ (OpenEditorsReadonlyEditorContext.toNegated()),
307
+ (ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)),
308
+ (AutoSaveAfterShortDelayContext.toNegated()))))
351
309
  });
352
310
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
353
311
  group: '2_save',
354
312
  order: 30,
355
313
  command: {
356
314
  id: SAVE_ALL_IN_GROUP_COMMAND_ID,
357
- title: ( localizeWithPath(
358
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
359
- 'saveAll',
360
- "Save All"
361
- )),
315
+ title: ( localizeWithPath(_moduleId, 14, "Save All")),
362
316
  precondition: DirtyWorkingCopiesContext
363
317
  },
364
318
  when: OpenEditorsGroupContext
@@ -368,106 +322,82 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
368
322
  order: 10,
369
323
  command: {
370
324
  id: COMPARE_WITH_SAVED_COMMAND_ID,
371
- title: ( localizeWithPath(
372
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
373
- 'compareWithSaved',
374
- "Compare with Saved"
375
- )),
325
+ title: ( localizeWithPath(_moduleId, 15, "Compare with Saved")),
376
326
  precondition: OpenEditorsDirtyEditorContext
377
327
  },
378
- when: ( ContextKeyExpr.and(ResourceContextKey.IsFileSystemResource, ( AutoSaveAfterShortDelayContext.toNegated()), ( WorkbenchListDoubleSelection.toNegated())))
328
+ when: ( (ContextKeyExpr.and(
329
+ ResourceContextKey.IsFileSystemResource,
330
+ (AutoSaveAfterShortDelayContext.toNegated()),
331
+ (WorkbenchListDoubleSelection.toNegated())
332
+ )))
379
333
  });
380
334
  const compareResourceCommand = {
381
335
  id: COMPARE_RESOURCE_COMMAND_ID,
382
- title: ( localizeWithPath(
383
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
384
- 'compareWithSelected',
385
- "Compare with Selected"
386
- ))
336
+ title: ( localizeWithPath(_moduleId, 16, "Compare with Selected"))
387
337
  };
388
338
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
389
339
  group: '3_compare',
390
340
  order: 20,
391
341
  command: compareResourceCommand,
392
- when: ( ContextKeyExpr.and(
342
+ when: ( (ContextKeyExpr.and(
393
343
  ResourceContextKey.HasResource,
394
344
  ResourceSelectedForCompareContext,
395
345
  isFileOrUntitledResourceContextKey,
396
- ( WorkbenchListDoubleSelection.toNegated())
397
- ))
346
+ (WorkbenchListDoubleSelection.toNegated())
347
+ )))
398
348
  });
399
349
  const selectForCompareCommand = {
400
350
  id: SELECT_FOR_COMPARE_COMMAND_ID,
401
- title: ( localizeWithPath(
402
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
403
- 'compareSource',
404
- "Select for Compare"
405
- ))
351
+ title: ( localizeWithPath(_moduleId, 17, "Select for Compare"))
406
352
  };
407
353
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
408
354
  group: '3_compare',
409
355
  order: 30,
410
356
  command: selectForCompareCommand,
411
- when: ( ContextKeyExpr.and(
357
+ when: ( (ContextKeyExpr.and(
412
358
  ResourceContextKey.HasResource,
413
359
  isFileOrUntitledResourceContextKey,
414
- ( WorkbenchListDoubleSelection.toNegated())
415
- ))
360
+ (WorkbenchListDoubleSelection.toNegated())
361
+ )))
416
362
  });
417
363
  const compareSelectedCommand = {
418
364
  id: COMPARE_SELECTED_COMMAND_ID,
419
- title: ( localizeWithPath(
420
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
421
- 'compareSelected',
422
- "Compare Selected"
423
- ))
365
+ title: ( localizeWithPath(_moduleId, 18, "Compare Selected"))
424
366
  };
425
367
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
426
368
  group: '3_compare',
427
369
  order: 30,
428
370
  command: compareSelectedCommand,
429
- when: ( ContextKeyExpr.and(
371
+ when: ( (ContextKeyExpr.and(
430
372
  ResourceContextKey.HasResource,
431
373
  WorkbenchListDoubleSelection,
432
374
  isFileOrUntitledResourceContextKey
433
- ))
375
+ )))
434
376
  });
435
377
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
436
378
  group: '4_close',
437
379
  order: 10,
438
380
  command: {
439
381
  id: CLOSE_EDITOR_COMMAND_ID,
440
- title: ( localizeWithPath(
441
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
442
- 'close',
443
- "Close"
444
- ))
382
+ title: ( localizeWithPath(_moduleId, 19, "Close"))
445
383
  },
446
- when: ( OpenEditorsGroupContext.toNegated())
384
+ when: ( (OpenEditorsGroupContext.toNegated()))
447
385
  });
448
386
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
449
387
  group: '4_close',
450
388
  order: 20,
451
389
  command: {
452
390
  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
- ))
391
+ title: ( localizeWithPath(_moduleId, 20, "Close Others"))
458
392
  },
459
- when: ( OpenEditorsGroupContext.toNegated())
393
+ when: ( (OpenEditorsGroupContext.toNegated()))
460
394
  });
461
395
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
462
396
  group: '4_close',
463
397
  order: 30,
464
398
  command: {
465
399
  id: CLOSE_SAVED_EDITORS_COMMAND_ID,
466
- title: ( localizeWithPath(
467
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
468
- 'closeSaved',
469
- "Close Saved"
470
- ))
400
+ title: ( localizeWithPath(_moduleId, 21, "Close Saved"))
471
401
  }
472
402
  });
473
403
  MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
@@ -475,11 +405,7 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
475
405
  order: 40,
476
406
  command: {
477
407
  id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
478
- title: ( localizeWithPath(
479
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
480
- 'closeAll',
481
- "Close All"
482
- ))
408
+ title: ( localizeWithPath(_moduleId, 22, "Close All"))
483
409
  }
484
410
  });
485
411
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
@@ -506,51 +432,65 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
506
432
  group: 'navigation',
507
433
  order: 10,
508
434
  command: openToSideCommand,
509
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource))
435
+ when: ( (ContextKeyExpr.and(
436
+ (ExplorerFolderContext.toNegated()),
437
+ ResourceContextKey.HasResource
438
+ )))
510
439
  });
511
440
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
512
441
  group: 'navigation',
513
442
  order: 20,
514
443
  command: {
515
444
  id: OPEN_WITH_EXPLORER_COMMAND_ID,
516
- title: ( localizeWithPath(
517
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
518
- 'explorerOpenWith',
519
- "Open With..."
520
- )),
445
+ title: ( localizeWithPath(_moduleId, 23, "Open With...")),
521
446
  },
522
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ExplorerResourceAvailableEditorIdsContext)),
447
+ when: ( (ContextKeyExpr.and(
448
+ (ExplorerFolderContext.toNegated()),
449
+ ExplorerResourceAvailableEditorIdsContext
450
+ ))),
523
451
  });
524
452
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
525
453
  group: '3_compare',
526
454
  order: 20,
527
455
  command: compareResourceCommand,
528
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, ResourceSelectedForCompareContext, ( WorkbenchListDoubleSelection.toNegated())))
456
+ when: ( (ContextKeyExpr.and(
457
+ (ExplorerFolderContext.toNegated()),
458
+ ResourceContextKey.HasResource,
459
+ ResourceSelectedForCompareContext,
460
+ (WorkbenchListDoubleSelection.toNegated())
461
+ )))
529
462
  });
530
463
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
531
464
  group: '3_compare',
532
465
  order: 30,
533
466
  command: selectForCompareCommand,
534
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, ( WorkbenchListDoubleSelection.toNegated())))
467
+ when: ( (ContextKeyExpr.and(
468
+ (ExplorerFolderContext.toNegated()),
469
+ ResourceContextKey.HasResource,
470
+ (WorkbenchListDoubleSelection.toNegated())
471
+ )))
535
472
  });
536
473
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
537
474
  group: '3_compare',
538
475
  order: 30,
539
476
  command: compareSelectedCommand,
540
- when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, WorkbenchListDoubleSelection))
477
+ when: ( (ContextKeyExpr.and(
478
+ (ExplorerFolderContext.toNegated()),
479
+ ResourceContextKey.HasResource,
480
+ WorkbenchListDoubleSelection
481
+ )))
541
482
  });
542
483
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
543
484
  group: '5_cutcopypaste',
544
485
  order: 8,
545
486
  command: {
546
487
  id: CUT_FILE_ID,
547
- title: ( localizeWithPath(
548
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
549
- 'cut',
550
- "Cut"
551
- ))
488
+ title: ( localizeWithPath(_moduleId, 24, "Cut"))
552
489
  },
553
- when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ExplorerResourceNotReadonlyContext))
490
+ when: ( (ContextKeyExpr.and(
491
+ (ExplorerRootContext.toNegated()),
492
+ ExplorerResourceNotReadonlyContext
493
+ )))
554
494
  });
555
495
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
556
496
  group: '5_cutcopypaste',
@@ -559,7 +499,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
559
499
  id: COPY_FILE_ID,
560
500
  title: COPY_FILE_LABEL
561
501
  },
562
- when: ( ExplorerRootContext.toNegated())
502
+ when: ( (ExplorerRootContext.toNegated()))
563
503
  });
564
504
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
565
505
  group: '5_cutcopypaste',
@@ -567,7 +507,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
567
507
  command: {
568
508
  id: PASTE_FILE_ID,
569
509
  title: PASTE_FILE_LABEL,
570
- precondition: ( ContextKeyExpr.and(ExplorerResourceNotReadonlyContext, FileCopiedContext))
510
+ precondition: ( (ContextKeyExpr.and(ExplorerResourceNotReadonlyContext, FileCopiedContext)))
571
511
  },
572
512
  when: ExplorerFolderContext
573
513
  });
@@ -578,10 +518,17 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
578
518
  id: DOWNLOAD_COMMAND_ID,
579
519
  title: DOWNLOAD_LABEL
580
520
  },
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))))
521
+ when: ( (ContextKeyExpr.or(
522
+ (ContextKeyExpr.and(
523
+ (IsWebContext.toNegated()),
524
+ (ResourceContextKey.Scheme.notEqualsTo(Schemas.file))
525
+ )),
526
+ (ContextKeyExpr.and(
527
+ IsWebContext,
528
+ (ExplorerFolderContext.toNegated()),
529
+ (ExplorerRootContext.toNegated())
530
+ )),
531
+ (ContextKeyExpr.and(IsWebContext, HasWebFileSystemAccess)))))
585
532
  }));
586
533
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
587
534
  group: '5b_importexport',
@@ -590,10 +537,10 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
590
537
  id: UPLOAD_COMMAND_ID,
591
538
  title: UPLOAD_LABEL,
592
539
  },
593
- when: ( ContextKeyExpr.and(
540
+ when: ( (ContextKeyExpr.and(
594
541
  IsWebContext,
595
542
  ExplorerFolderContext,
596
- ExplorerResourceNotReadonlyContext))
543
+ ExplorerResourceNotReadonlyContext)))
597
544
  }));
598
545
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
599
546
  group: '6_copypath',
@@ -614,7 +561,10 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
614
561
  id: ADD_ROOT_FOLDER_COMMAND_ID,
615
562
  title: ADD_ROOT_FOLDER_LABEL
616
563
  },
617
- when: ( ContextKeyExpr.and(ExplorerRootContext, ( ContextKeyExpr.or(EnterMultiRootWorkspaceSupportContext, ( WorkbenchStateContext.isEqualTo('workspace'))))))
564
+ when: ( (ContextKeyExpr.and(ExplorerRootContext, (ContextKeyExpr.or(
565
+ EnterMultiRootWorkspaceSupportContext,
566
+ (WorkbenchStateContext.isEqualTo('workspace'))
567
+ )))))
618
568
  });
619
569
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
620
570
  group: '2_workspace',
@@ -623,7 +573,17 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
623
573
  id: REMOVE_ROOT_FOLDER_COMMAND_ID,
624
574
  title: REMOVE_ROOT_FOLDER_LABEL
625
575
  },
626
- when: ( ContextKeyExpr.and(ExplorerRootContext, ExplorerFolderContext, ( ContextKeyExpr.and(( WorkspaceFolderCountContext.notEqualsTo('0')), ( ContextKeyExpr.or(EnterMultiRootWorkspaceSupportContext, ( WorkbenchStateContext.isEqualTo('workspace'))))))))
576
+ when: ( (ContextKeyExpr.and(
577
+ ExplorerRootContext,
578
+ ExplorerFolderContext,
579
+ (ContextKeyExpr.and(
580
+ (WorkspaceFolderCountContext.notEqualsTo('0')),
581
+ (ContextKeyExpr.or(
582
+ EnterMultiRootWorkspaceSupportContext,
583
+ (WorkbenchStateContext.isEqualTo('workspace'))
584
+ ))
585
+ ))
586
+ )))
627
587
  });
628
588
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
629
589
  group: '7_modification',
@@ -633,7 +593,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
633
593
  title: TRIGGER_RENAME_LABEL,
634
594
  precondition: ExplorerResourceNotReadonlyContext
635
595
  },
636
- when: ( ExplorerRootContext.toNegated())
596
+ when: ( (ExplorerRootContext.toNegated()))
637
597
  });
638
598
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
639
599
  group: '7_modification',
@@ -645,50 +605,36 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
645
605
  },
646
606
  alt: {
647
607
  id: DELETE_FILE_ID,
648
- title: ( localizeWithPath(
649
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
650
- 'deleteFile',
651
- "Delete Permanently"
652
- )),
608
+ title: ( localizeWithPath(_moduleId, 25, "Delete Permanently")),
653
609
  precondition: ExplorerResourceNotReadonlyContext
654
610
  },
655
- when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ExplorerResourceMoveableToTrash))
611
+ when: ( (ContextKeyExpr.and(
612
+ (ExplorerRootContext.toNegated()),
613
+ ExplorerResourceMoveableToTrash
614
+ )))
656
615
  });
657
616
  MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
658
617
  group: '7_modification',
659
618
  order: 20,
660
619
  command: {
661
620
  id: DELETE_FILE_ID,
662
- title: ( localizeWithPath(
663
- 'vs/workbench/contrib/files/browser/fileActions.contribution',
664
- 'deleteFile',
665
- "Delete Permanently"
666
- )),
621
+ title: ( localizeWithPath(_moduleId, 25, "Delete Permanently")),
667
622
  precondition: ExplorerResourceNotReadonlyContext
668
623
  },
669
- when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ( ExplorerResourceMoveableToTrash.toNegated())))
624
+ when: ( (ContextKeyExpr.and(
625
+ (ExplorerRootContext.toNegated()),
626
+ (ExplorerResourceMoveableToTrash.toNegated())
627
+ )))
670
628
  });
671
629
  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 });
630
+ MenuRegistry.appendMenuItem(menuId, { command: { id: NEW_UNTITLED_FILE_COMMAND_ID, title: ( localizeWithPath(_moduleId, 26, "New Text File")) }, group: '1_file', order: 10 });
631
+ MenuRegistry.appendMenuItem(menuId, { command: { id: 'workbench.action.quickOpen', title: ( localizeWithPath(_moduleId, 27, "Open File...")) }, group: '1_file', order: 20 });
682
632
  }
683
633
  MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
684
634
  group: '1_new',
685
635
  command: {
686
636
  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
- ))
637
+ title: ( localizeWithPath(_moduleId, 28, "&&New Text File"))
692
638
  },
693
639
  order: 1
694
640
  });
@@ -696,12 +642,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
696
642
  group: '4_save',
697
643
  command: {
698
644
  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))))
645
+ title: ( localizeWithPath(_moduleId, 29, "&&Save")),
646
+ precondition: ( (ContextKeyExpr.or(
647
+ ActiveEditorContext,
648
+ (ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))
649
+ )))
705
650
  },
706
651
  order: 1
707
652
  });
@@ -709,12 +654,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
709
654
  group: '4_save',
710
655
  command: {
711
656
  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))))
657
+ title: ( localizeWithPath(_moduleId, 30, "Save &&As...")),
658
+ precondition: ( (ContextKeyExpr.or(
659
+ ActiveEditorContext,
660
+ (ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))
661
+ )))
718
662
  },
719
663
  order: 2
720
664
  });
@@ -722,11 +666,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
722
666
  group: '4_save',
723
667
  command: {
724
668
  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
- )),
669
+ title: ( localizeWithPath(_moduleId, 31, "Save A&&ll")),
730
670
  precondition: DirtyWorkingCopiesContext
731
671
  },
732
672
  order: 3
@@ -735,12 +675,8 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
735
675
  group: '5_autosave',
736
676
  command: {
737
677
  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'))
678
+ title: ( localizeWithPath(_moduleId, 32, "A&&uto Save")),
679
+ toggled: ( (ContextKeyExpr.notEquals('config.files.autoSave', 'off')))
744
680
  },
745
681
  order: 1
746
682
  });
@@ -748,14 +684,14 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
748
684
  group: '6_close',
749
685
  command: {
750
686
  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)))),
687
+ title: ( localizeWithPath(_moduleId, 33, "Re&&vert File")),
688
+ precondition: ( (ContextKeyExpr.or(
689
+ (ContextKeyExpr.and(ActiveEditorCanRevertContext)),
690
+ (ContextKeyExpr.and(
691
+ (ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)),
692
+ FoldersViewVisibleContext,
693
+ SidebarFocusContext
694
+ ))))),
759
695
  },
760
696
  order: 1
761
697
  });
@@ -763,12 +699,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
763
699
  group: '6_close',
764
700
  command: {
765
701
  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))))
702
+ title: ( localizeWithPath(_moduleId, 34, "&&Close Editor")),
703
+ precondition: ( (ContextKeyExpr.or(
704
+ ActiveEditorContext,
705
+ (ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))
706
+ )))
772
707
  },
773
708
  order: 2
774
709
  });
@@ -776,11 +711,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
776
711
  group: '3_global_nav',
777
712
  command: {
778
713
  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
- ))
714
+ title: ( localizeWithPath(_moduleId, 35, "Go to &&File..."))
784
715
  },
785
716
  order: 1
786
717
  });