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