@codingame/monaco-vscode-views-service-override 1.83.4 → 1.83.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +8 -3
- package/index.js +7 -1
- package/l10n.js +8 -0
- package/missing-services.js +2141 -0
- package/package.json +2 -2
- package/services.js +95 -0
- package/views.d.ts +51 -15
- package/views.js +124 -96
- package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +1 -1
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +262 -49
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +57 -42
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -11
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +14 -2
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +18 -3
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +52 -20
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +6 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +23 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +60 -12
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.d.ts +112 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +11 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +12 -2
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +27 -15
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +32 -19
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -18
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +29 -5
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +17 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +55 -10
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +5 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.js +22 -3
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +5 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +40 -8
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +5 -1
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +36 -10
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +111 -16
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +153 -97
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +28 -6
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution2.js +11 -463
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +16 -4
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +10 -4
- package/vscode/src/vs/workbench/contrib/languageDetection/browser/languageDetection.contribution.js +27 -5
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +53 -28
- package/vscode/src/vs/workbench/contrib/outline/browser/outline.contribution.js +180 -36
- package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.js +17 -3
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +29 -5
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +85 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +301 -62
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +48 -16
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +29 -5
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +17 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +6 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +25 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +5 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +49 -9
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +36 -36
- package/vscode/src/vs/workbench/services/hover/browser/hoverWidget.js +6 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +5 -1
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +14 -5
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +5 -1
|
@@ -29,7 +29,11 @@ import { hash } from 'monaco-editor/esm/vs/base/common/hash.js';
|
|
|
29
29
|
const CONFLICT_RESOLUTION_CONTEXT = 'saveConflictResolutionContext';
|
|
30
30
|
const CONFLICT_RESOLUTION_SCHEME = 'conflictResolution';
|
|
31
31
|
const LEARN_MORE_DIRTY_WRITE_IGNORE_KEY = 'learnMoreDirtyWriteError';
|
|
32
|
-
const conflictEditorHelp = localizeWithPath(
|
|
32
|
+
const conflictEditorHelp = ( localizeWithPath(
|
|
33
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
34
|
+
'userGuide',
|
|
35
|
+
"Use the actions in the editor tool bar to either undo your changes or overwrite the content of the file with your changes."
|
|
36
|
+
));
|
|
33
37
|
let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable {
|
|
34
38
|
constructor(notificationService, textFileService, contextKeyService, editorService, textModelService, instantiationService, storageService) {
|
|
35
39
|
super();
|
|
@@ -89,7 +93,12 @@ let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable
|
|
|
89
93
|
secondaryActions.push(this.instantiationService.createInstance(DoNotShowResolveConflictLearnMoreAction));
|
|
90
94
|
}
|
|
91
95
|
else {
|
|
92
|
-
message =
|
|
96
|
+
message = ( localizeWithPath(
|
|
97
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
98
|
+
'staleSaveError',
|
|
99
|
+
"Failed to save '{0}': The content of the file is newer. Please compare your version with the file contents or overwrite the content of the file with your changes.",
|
|
100
|
+
basename(resource)
|
|
101
|
+
));
|
|
93
102
|
primaryActions.push(this.instantiationService.createInstance(ResolveSaveConflictAction, model));
|
|
94
103
|
primaryActions.push(this.instantiationService.createInstance(SaveModelIgnoreModifiedSinceAction, model));
|
|
95
104
|
secondaryActions.push(this.instantiationService.createInstance(ConfigureSaveConflictAction));
|
|
@@ -113,17 +122,48 @@ let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable
|
|
|
113
122
|
primaryActions.push(this.instantiationService.createInstance(DiscardModelAction, model));
|
|
114
123
|
if (isWriteLocked) {
|
|
115
124
|
if (triedToUnlock && canSaveElevated) {
|
|
116
|
-
message = isWindows ?
|
|
125
|
+
message = isWindows ? ( localizeWithPath(
|
|
126
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
127
|
+
'readonlySaveErrorAdmin',
|
|
128
|
+
"Failed to save '{0}': File is read-only. Select 'Overwrite as Admin' to retry as administrator.",
|
|
129
|
+
basename(resource)
|
|
130
|
+
)) : ( localizeWithPath(
|
|
131
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
132
|
+
'readonlySaveErrorSudo',
|
|
133
|
+
"Failed to save '{0}': File is read-only. Select 'Overwrite as Sudo' to retry as superuser.",
|
|
134
|
+
basename(resource)
|
|
135
|
+
));
|
|
117
136
|
}
|
|
118
137
|
else {
|
|
119
|
-
message =
|
|
138
|
+
message = ( localizeWithPath(
|
|
139
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
140
|
+
'readonlySaveError',
|
|
141
|
+
"Failed to save '{0}': File is read-only. Select 'Overwrite' to attempt to make it writeable.",
|
|
142
|
+
basename(resource)
|
|
143
|
+
));
|
|
120
144
|
}
|
|
121
145
|
}
|
|
122
146
|
else if (canSaveElevated && isPermissionDenied) {
|
|
123
|
-
message = isWindows ?
|
|
147
|
+
message = isWindows ? ( localizeWithPath(
|
|
148
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
149
|
+
'permissionDeniedSaveError',
|
|
150
|
+
"Failed to save '{0}': Insufficient permissions. Select 'Retry as Admin' to retry as administrator.",
|
|
151
|
+
basename(resource)
|
|
152
|
+
)) : ( localizeWithPath(
|
|
153
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
154
|
+
'permissionDeniedSaveErrorSudo',
|
|
155
|
+
"Failed to save '{0}': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.",
|
|
156
|
+
basename(resource)
|
|
157
|
+
));
|
|
124
158
|
}
|
|
125
159
|
else {
|
|
126
|
-
message =
|
|
160
|
+
message = ( localizeWithPath(
|
|
161
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
162
|
+
{ key: 'genericSaveError', comment: ['{0} is the resource that failed to save and {1} the error message'] },
|
|
163
|
+
"Failed to save '{0}': {1}",
|
|
164
|
+
basename(resource),
|
|
165
|
+
toErrorMessage(error, false)
|
|
166
|
+
));
|
|
127
167
|
}
|
|
128
168
|
}
|
|
129
169
|
const actions = { primary: primaryActions, secondary: secondaryActions };
|
|
@@ -152,7 +192,11 @@ TextFileSaveErrorHandler = ( __decorate([
|
|
|
152
192
|
], TextFileSaveErrorHandler));
|
|
153
193
|
let ResolveConflictLearnMoreAction = class ResolveConflictLearnMoreAction extends Action {
|
|
154
194
|
constructor(openerService) {
|
|
155
|
-
super('workbench.files.action.resolveConflictLearnMore', localizeWithPath(
|
|
195
|
+
super('workbench.files.action.resolveConflictLearnMore', ( localizeWithPath(
|
|
196
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
197
|
+
'learnMore',
|
|
198
|
+
"Learn More"
|
|
199
|
+
)));
|
|
156
200
|
this.openerService = openerService;
|
|
157
201
|
}
|
|
158
202
|
async run() {
|
|
@@ -164,7 +208,11 @@ ResolveConflictLearnMoreAction = ( __decorate([
|
|
|
164
208
|
], ResolveConflictLearnMoreAction));
|
|
165
209
|
let DoNotShowResolveConflictLearnMoreAction = class DoNotShowResolveConflictLearnMoreAction extends Action {
|
|
166
210
|
constructor(storageService) {
|
|
167
|
-
super('workbench.files.action.resolveConflictLearnMoreDoNotShowAgain', localizeWithPath(
|
|
211
|
+
super('workbench.files.action.resolveConflictLearnMoreDoNotShowAgain', ( localizeWithPath(
|
|
212
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
213
|
+
'dontShowAgain',
|
|
214
|
+
"Don't Show Again"
|
|
215
|
+
)));
|
|
168
216
|
this.storageService = storageService;
|
|
169
217
|
}
|
|
170
218
|
async run(notification) {
|
|
@@ -177,7 +225,11 @@ DoNotShowResolveConflictLearnMoreAction = ( __decorate([
|
|
|
177
225
|
], DoNotShowResolveConflictLearnMoreAction));
|
|
178
226
|
let ResolveSaveConflictAction = class ResolveSaveConflictAction extends Action {
|
|
179
227
|
constructor(model, editorService, notificationService, instantiationService, productService) {
|
|
180
|
-
super('workbench.files.action.resolveConflict', localizeWithPath(
|
|
228
|
+
super('workbench.files.action.resolveConflict', ( localizeWithPath(
|
|
229
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
230
|
+
'compareChanges',
|
|
231
|
+
"Compare"
|
|
232
|
+
)));
|
|
181
233
|
this.model = model;
|
|
182
234
|
this.editorService = editorService;
|
|
183
235
|
this.notificationService = notificationService;
|
|
@@ -188,7 +240,14 @@ let ResolveSaveConflictAction = class ResolveSaveConflictAction extends Action {
|
|
|
188
240
|
if (!this.model.isDisposed()) {
|
|
189
241
|
const resource = this.model.resource;
|
|
190
242
|
const name = basename(resource);
|
|
191
|
-
const editorLabel =
|
|
243
|
+
const editorLabel = ( localizeWithPath(
|
|
244
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
245
|
+
'saveConflictDiffLabel',
|
|
246
|
+
"{0} (in file) ↔ {1} (in {2}) - Resolve save conflict",
|
|
247
|
+
name,
|
|
248
|
+
name,
|
|
249
|
+
this.productService.nameLong
|
|
250
|
+
));
|
|
192
251
|
await TextFileContentProvider.open(resource, CONFLICT_RESOLUTION_SCHEME, editorLabel, this.editorService, { pinned: true });
|
|
193
252
|
const actions = { primary: [this.instantiationService.createInstance(ResolveConflictLearnMoreAction)] };
|
|
194
253
|
const handle = this.notificationService.notify({
|
|
@@ -210,7 +269,23 @@ ResolveSaveConflictAction = ( __decorate([
|
|
|
210
269
|
], ResolveSaveConflictAction));
|
|
211
270
|
class SaveModelElevatedAction extends Action {
|
|
212
271
|
constructor(model, triedToUnlock) {
|
|
213
|
-
super('workbench.files.action.saveModelElevated', triedToUnlock ? isWindows ?
|
|
272
|
+
super('workbench.files.action.saveModelElevated', triedToUnlock ? isWindows ? ( localizeWithPath(
|
|
273
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
274
|
+
'overwriteElevated',
|
|
275
|
+
"Overwrite as Admin..."
|
|
276
|
+
)) : ( localizeWithPath(
|
|
277
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
278
|
+
'overwriteElevatedSudo',
|
|
279
|
+
"Overwrite as Sudo..."
|
|
280
|
+
)) : isWindows ? ( localizeWithPath(
|
|
281
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
282
|
+
'saveElevated',
|
|
283
|
+
"Retry as Admin..."
|
|
284
|
+
)) : ( localizeWithPath(
|
|
285
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
286
|
+
'saveElevatedSudo',
|
|
287
|
+
"Retry as Sudo..."
|
|
288
|
+
)));
|
|
214
289
|
this.model = model;
|
|
215
290
|
this.triedToUnlock = triedToUnlock;
|
|
216
291
|
}
|
|
@@ -226,7 +301,11 @@ class SaveModelElevatedAction extends Action {
|
|
|
226
301
|
}
|
|
227
302
|
class RetrySaveModelAction extends Action {
|
|
228
303
|
constructor(model) {
|
|
229
|
-
super('workbench.files.action.saveModel', localizeWithPath(
|
|
304
|
+
super('workbench.files.action.saveModel', ( localizeWithPath(
|
|
305
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
306
|
+
'retry',
|
|
307
|
+
"Retry"
|
|
308
|
+
)));
|
|
230
309
|
this.model = model;
|
|
231
310
|
}
|
|
232
311
|
async run() {
|
|
@@ -237,7 +316,11 @@ class RetrySaveModelAction extends Action {
|
|
|
237
316
|
}
|
|
238
317
|
class DiscardModelAction extends Action {
|
|
239
318
|
constructor(model) {
|
|
240
|
-
super('workbench.files.action.discardModel', localizeWithPath(
|
|
319
|
+
super('workbench.files.action.discardModel', ( localizeWithPath(
|
|
320
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
321
|
+
'discard',
|
|
322
|
+
"Discard"
|
|
323
|
+
)));
|
|
241
324
|
this.model = model;
|
|
242
325
|
}
|
|
243
326
|
async run() {
|
|
@@ -280,7 +363,11 @@ SaveModelAsAction = ( __decorate([
|
|
|
280
363
|
], SaveModelAsAction));
|
|
281
364
|
class UnlockModelAction extends Action {
|
|
282
365
|
constructor(model) {
|
|
283
|
-
super('workbench.files.action.unlock', localizeWithPath(
|
|
366
|
+
super('workbench.files.action.unlock', ( localizeWithPath(
|
|
367
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
368
|
+
'overwrite',
|
|
369
|
+
"Overwrite"
|
|
370
|
+
)));
|
|
284
371
|
this.model = model;
|
|
285
372
|
}
|
|
286
373
|
async run() {
|
|
@@ -291,7 +378,11 @@ class UnlockModelAction extends Action {
|
|
|
291
378
|
}
|
|
292
379
|
class SaveModelIgnoreModifiedSinceAction extends Action {
|
|
293
380
|
constructor(model) {
|
|
294
|
-
super('workbench.files.action.saveIgnoreModifiedSince', localizeWithPath(
|
|
381
|
+
super('workbench.files.action.saveIgnoreModifiedSince', ( localizeWithPath(
|
|
382
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
383
|
+
'overwrite',
|
|
384
|
+
"Overwrite"
|
|
385
|
+
)));
|
|
295
386
|
this.model = model;
|
|
296
387
|
}
|
|
297
388
|
async run() {
|
|
@@ -302,7 +393,11 @@ class SaveModelIgnoreModifiedSinceAction extends Action {
|
|
|
302
393
|
}
|
|
303
394
|
let ConfigureSaveConflictAction = class ConfigureSaveConflictAction extends Action {
|
|
304
395
|
constructor(preferencesService) {
|
|
305
|
-
super('workbench.files.action.configureSaveConflict', localizeWithPath(
|
|
396
|
+
super('workbench.files.action.configureSaveConflict', ( localizeWithPath(
|
|
397
|
+
'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler',
|
|
398
|
+
'configure',
|
|
399
|
+
"Configure"
|
|
400
|
+
)));
|
|
306
401
|
this.preferencesService = preferencesService;
|
|
307
402
|
}
|
|
308
403
|
async run() {
|
|
@@ -3,16 +3,16 @@ import { GlobalCompareResourcesAction, FocusFilesExplorer, ShowActiveFileInExplo
|
|
|
3
3
|
import { CONFLICT_RESOLUTION_CONTEXT } from './editors/textFileSaveErrorHandler.js';
|
|
4
4
|
import { registerAction2, MenuRegistry, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
5
5
|
import './fileCommands.js';
|
|
6
|
-
import { COPY_PATH_COMMAND_ID, COPY_RELATIVE_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_COMMAND_ID, SAVE_FILE_WITHOUT_FORMATTING_LABEL, SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_FILES_COMMAND_ID, REVERT_FILE_COMMAND_ID, COMPARE_WITH_SAVED_COMMAND_ID, SAVE_FILE_AS_LABEL, SAVE_FILE_AS_COMMAND_ID, NEW_UNTITLED_FILE_LABEL, NEW_UNTITLED_FILE_COMMAND_ID, 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
|
|
6
|
+
import { COPY_PATH_COMMAND_ID, COPY_RELATIVE_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_COMMAND_ID, SAVE_FILE_WITHOUT_FORMATTING_LABEL, SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_FILES_COMMAND_ID, REVERT_FILE_COMMAND_ID, COMPARE_WITH_SAVED_COMMAND_ID, SAVE_FILE_AS_LABEL, SAVE_FILE_AS_COMMAND_ID, NEW_UNTITLED_FILE_LABEL, NEW_UNTITLED_FILE_COMMAND_ID, 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 } from 'vscode/vscode/vs/workbench/contrib/files/browser/fileConstants';
|
|
7
7
|
import { ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
8
8
|
import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
|
|
9
|
-
import { FilesExplorerFocusCondition, ExplorerRootContext, ExplorerResourceNotReadonlyContext, ExplorerResourceMoveableToTrash, ExplorerResourceCut, ExplorerFolderContext, ExplorerResourceAvailableEditorIdsContext
|
|
9
|
+
import { FilesExplorerFocusCondition, ExplorerRootContext, ExplorerResourceNotReadonlyContext, ExplorerResourceMoveableToTrash, ExplorerResourceCut, ExplorerFolderContext, ExplorerResourceAvailableEditorIdsContext } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
10
10
|
import { ADD_ROOT_FOLDER_COMMAND_ID, ADD_ROOT_FOLDER_LABEL } from 'vscode/vscode/vs/workbench/browser/actions/workspaceCommands';
|
|
11
11
|
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';
|
|
12
12
|
import { AutoSaveAfterShortDelayContext } from 'vscode/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService';
|
|
13
13
|
import { WorkbenchListDoubleSelection } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
|
|
14
14
|
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
15
|
-
import { ResourceContextKey, WorkspaceFolderCountContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, HasWebFileSystemAccess, EnterMultiRootWorkspaceSupportContext, WorkbenchStateContext
|
|
15
|
+
import { ResourceContextKey, WorkspaceFolderCountContext, ActiveEditorAvailableEditorIdsContext, DirtyWorkingCopiesContext, HasWebFileSystemAccess, EnterMultiRootWorkspaceSupportContext, WorkbenchStateContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
16
16
|
import { IsWebContext } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js';
|
|
17
17
|
import { IExplorerService } from 'vscode/vscode/vs/workbench/contrib/files/browser/files';
|
|
18
18
|
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
@@ -125,15 +125,27 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
125
125
|
});
|
|
126
126
|
const copyPathCommand = {
|
|
127
127
|
id: COPY_PATH_COMMAND_ID,
|
|
128
|
-
title: nls.localizeWithPath(
|
|
128
|
+
title: ( nls.localizeWithPath(
|
|
129
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
130
|
+
'copyPath',
|
|
131
|
+
"Copy Path"
|
|
132
|
+
))
|
|
129
133
|
};
|
|
130
134
|
const copyRelativePathCommand = {
|
|
131
135
|
id: COPY_RELATIVE_PATH_COMMAND_ID,
|
|
132
|
-
title: nls.localizeWithPath(
|
|
136
|
+
title: ( nls.localizeWithPath(
|
|
137
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
138
|
+
'copyRelativePath',
|
|
139
|
+
"Copy Relative Path"
|
|
140
|
+
))
|
|
133
141
|
};
|
|
134
142
|
appendEditorTitleContextMenuItem(COPY_PATH_COMMAND_ID, copyPathCommand.title, ResourceContextKey.IsFileSystemResource, '1_cutcopypaste');
|
|
135
143
|
appendEditorTitleContextMenuItem(COPY_RELATIVE_PATH_COMMAND_ID, copyRelativePathCommand.title, ResourceContextKey.IsFileSystemResource, '1_cutcopypaste');
|
|
136
|
-
appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, nls.localizeWithPath(
|
|
144
|
+
appendEditorTitleContextMenuItem(REVEAL_IN_EXPLORER_COMMAND_ID, ( nls.localizeWithPath(
|
|
145
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
146
|
+
'revealInSideBar',
|
|
147
|
+
"Reveal in Explorer View"
|
|
148
|
+
)), ResourceContextKey.IsFileSystemResource, '2_files', 1);
|
|
137
149
|
function appendEditorTitleContextMenuItem(id, title, when, group, order) {
|
|
138
150
|
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, {
|
|
139
151
|
command: { id, title },
|
|
@@ -142,8 +154,16 @@ function appendEditorTitleContextMenuItem(id, title, when, group, order) {
|
|
|
142
154
|
order
|
|
143
155
|
});
|
|
144
156
|
}
|
|
145
|
-
appendSaveConflictEditorTitleAction('workbench.files.action.acceptLocalChanges', nls.localizeWithPath(
|
|
146
|
-
|
|
157
|
+
appendSaveConflictEditorTitleAction('workbench.files.action.acceptLocalChanges', ( nls.localizeWithPath(
|
|
158
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
159
|
+
'acceptLocalChanges',
|
|
160
|
+
"Use your changes and overwrite file contents"
|
|
161
|
+
)), Codicon.check, -10);
|
|
162
|
+
appendSaveConflictEditorTitleAction('workbench.files.action.revertLocalChanges', ( nls.localizeWithPath(
|
|
163
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
164
|
+
'revertLocalChanges',
|
|
165
|
+
"Discard your changes and revert to file contents"
|
|
166
|
+
)), Codicon.discard, -9);
|
|
147
167
|
function appendSaveConflictEditorTitleAction(id, title, icon, order, command) {
|
|
148
168
|
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
|
149
169
|
command: { id, title, icon },
|
|
@@ -162,14 +182,38 @@ function appendToCommandPalette(id, title, category, when) {
|
|
|
162
182
|
when
|
|
163
183
|
});
|
|
164
184
|
}
|
|
165
|
-
appendToCommandPalette(COPY_PATH_COMMAND_ID, { value: nls.localizeWithPath(
|
|
166
|
-
|
|
185
|
+
appendToCommandPalette(COPY_PATH_COMMAND_ID, { value: ( nls.localizeWithPath(
|
|
186
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
187
|
+
'copyPathOfActive',
|
|
188
|
+
"Copy Path of Active File"
|
|
189
|
+
)), original: 'Copy Path of Active File' }, Categories.File);
|
|
190
|
+
appendToCommandPalette(COPY_RELATIVE_PATH_COMMAND_ID, { value: ( nls.localizeWithPath(
|
|
191
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
192
|
+
'copyRelativePathOfActive',
|
|
193
|
+
"Copy Relative Path of Active File"
|
|
194
|
+
)), original: 'Copy Relative Path of Active File' }, Categories.File);
|
|
167
195
|
appendToCommandPalette(SAVE_FILE_COMMAND_ID, { value: SAVE_FILE_LABEL, original: 'Save' }, Categories.File);
|
|
168
196
|
appendToCommandPalette(SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID, { value: SAVE_FILE_WITHOUT_FORMATTING_LABEL, original: 'Save without Formatting' }, Categories.File);
|
|
169
|
-
appendToCommandPalette(SAVE_ALL_IN_GROUP_COMMAND_ID, { value: nls.localizeWithPath(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
197
|
+
appendToCommandPalette(SAVE_ALL_IN_GROUP_COMMAND_ID, { value: ( nls.localizeWithPath(
|
|
198
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
199
|
+
'saveAllInGroup',
|
|
200
|
+
"Save All in Group"
|
|
201
|
+
)), original: 'Save All in Group' }, Categories.File);
|
|
202
|
+
appendToCommandPalette(SAVE_FILES_COMMAND_ID, { value: ( nls.localizeWithPath(
|
|
203
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
204
|
+
'saveFiles',
|
|
205
|
+
"Save All Files"
|
|
206
|
+
)), original: 'Save All Files' }, Categories.File);
|
|
207
|
+
appendToCommandPalette(REVERT_FILE_COMMAND_ID, { value: ( nls.localizeWithPath(
|
|
208
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
209
|
+
'revert',
|
|
210
|
+
"Revert File"
|
|
211
|
+
)), original: 'Revert File' }, Categories.File);
|
|
212
|
+
appendToCommandPalette(COMPARE_WITH_SAVED_COMMAND_ID, { value: ( nls.localizeWithPath(
|
|
213
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
214
|
+
'compareActiveWithSaved',
|
|
215
|
+
"Compare Active File with Saved"
|
|
216
|
+
)), original: 'Compare Active File with Saved' }, Categories.File);
|
|
173
217
|
appendToCommandPalette(SAVE_FILE_AS_COMMAND_ID, { value: SAVE_FILE_AS_LABEL, original: 'Save As...' }, Categories.File);
|
|
174
218
|
appendToCommandPalette(NEW_FILE_COMMAND_ID, { value: NEW_FILE_LABEL, original: 'New File' }, Categories.File, ( WorkspaceFolderCountContext.notEqualsTo('0')));
|
|
175
219
|
appendToCommandPalette(NEW_FOLDER_COMMAND_ID, { value: NEW_FOLDER_LABEL, original: 'New Folder' }, Categories.File, ( WorkspaceFolderCountContext.notEqualsTo('0')));
|
|
@@ -177,7 +221,11 @@ appendToCommandPalette(NEW_UNTITLED_FILE_COMMAND_ID, { value: NEW_UNTITLED_FILE_
|
|
|
177
221
|
const isFileOrUntitledResourceContextKey = ( ContextKeyExpr.or(ResourceContextKey.IsFileSystemResource, ( ResourceContextKey.Scheme.isEqualTo(Schemas.untitled))));
|
|
178
222
|
const openToSideCommand = {
|
|
179
223
|
id: OPEN_TO_SIDE_COMMAND_ID,
|
|
180
|
-
title: nls.localizeWithPath(
|
|
224
|
+
title: ( nls.localizeWithPath(
|
|
225
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
226
|
+
'openToSide',
|
|
227
|
+
"Open to the Side"
|
|
228
|
+
))
|
|
181
229
|
};
|
|
182
230
|
MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
183
231
|
group: 'navigation',
|
|
@@ -190,7 +238,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
190
238
|
order: 10,
|
|
191
239
|
command: {
|
|
192
240
|
id: REOPEN_WITH_COMMAND_ID,
|
|
193
|
-
title: nls.localizeWithPath(
|
|
241
|
+
title: ( nls.localizeWithPath(
|
|
242
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
243
|
+
'reopenWith',
|
|
244
|
+
"Reopen Editor With..."
|
|
245
|
+
))
|
|
194
246
|
},
|
|
195
247
|
when: ActiveEditorAvailableEditorIdsContext
|
|
196
248
|
});
|
|
@@ -226,7 +278,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
226
278
|
order: 20,
|
|
227
279
|
command: {
|
|
228
280
|
id: REVERT_FILE_COMMAND_ID,
|
|
229
|
-
title: nls.localizeWithPath(
|
|
281
|
+
title: ( nls.localizeWithPath(
|
|
282
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
283
|
+
'revert',
|
|
284
|
+
"Revert File"
|
|
285
|
+
)),
|
|
230
286
|
precondition: OpenEditorsDirtyEditorContext
|
|
231
287
|
},
|
|
232
288
|
when: ( ContextKeyExpr.and((
|
|
@@ -240,7 +296,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
240
296
|
order: 30,
|
|
241
297
|
command: {
|
|
242
298
|
id: SAVE_ALL_IN_GROUP_COMMAND_ID,
|
|
243
|
-
title: nls.localizeWithPath(
|
|
299
|
+
title: ( nls.localizeWithPath(
|
|
300
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
301
|
+
'saveAll',
|
|
302
|
+
"Save All"
|
|
303
|
+
)),
|
|
244
304
|
precondition: DirtyWorkingCopiesContext
|
|
245
305
|
},
|
|
246
306
|
when: OpenEditorsGroupContext
|
|
@@ -250,14 +310,22 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
250
310
|
order: 10,
|
|
251
311
|
command: {
|
|
252
312
|
id: COMPARE_WITH_SAVED_COMMAND_ID,
|
|
253
|
-
title: nls.localizeWithPath(
|
|
313
|
+
title: ( nls.localizeWithPath(
|
|
314
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
315
|
+
'compareWithSaved',
|
|
316
|
+
"Compare with Saved"
|
|
317
|
+
)),
|
|
254
318
|
precondition: OpenEditorsDirtyEditorContext
|
|
255
319
|
},
|
|
256
320
|
when: ( ContextKeyExpr.and(ResourceContextKey.IsFileSystemResource, ( AutoSaveAfterShortDelayContext.toNegated()), ( WorkbenchListDoubleSelection.toNegated())))
|
|
257
321
|
});
|
|
258
322
|
const compareResourceCommand = {
|
|
259
323
|
id: COMPARE_RESOURCE_COMMAND_ID,
|
|
260
|
-
title: nls.localizeWithPath(
|
|
324
|
+
title: ( nls.localizeWithPath(
|
|
325
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
326
|
+
'compareWithSelected',
|
|
327
|
+
"Compare with Selected"
|
|
328
|
+
))
|
|
261
329
|
};
|
|
262
330
|
MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
263
331
|
group: '3_compare',
|
|
@@ -272,7 +340,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
272
340
|
});
|
|
273
341
|
const selectForCompareCommand = {
|
|
274
342
|
id: SELECT_FOR_COMPARE_COMMAND_ID,
|
|
275
|
-
title: nls.localizeWithPath(
|
|
343
|
+
title: ( nls.localizeWithPath(
|
|
344
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
345
|
+
'compareSource',
|
|
346
|
+
"Select for Compare"
|
|
347
|
+
))
|
|
276
348
|
};
|
|
277
349
|
MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
278
350
|
group: '3_compare',
|
|
@@ -286,7 +358,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
286
358
|
});
|
|
287
359
|
const compareSelectedCommand = {
|
|
288
360
|
id: COMPARE_SELECTED_COMMAND_ID,
|
|
289
|
-
title: nls.localizeWithPath(
|
|
361
|
+
title: ( nls.localizeWithPath(
|
|
362
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
363
|
+
'compareSelected',
|
|
364
|
+
"Compare Selected"
|
|
365
|
+
))
|
|
290
366
|
};
|
|
291
367
|
MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
292
368
|
group: '3_compare',
|
|
@@ -303,7 +379,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
303
379
|
order: 10,
|
|
304
380
|
command: {
|
|
305
381
|
id: CLOSE_EDITOR_COMMAND_ID,
|
|
306
|
-
title: nls.localizeWithPath(
|
|
382
|
+
title: ( nls.localizeWithPath(
|
|
383
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
384
|
+
'close',
|
|
385
|
+
"Close"
|
|
386
|
+
))
|
|
307
387
|
},
|
|
308
388
|
when: ( OpenEditorsGroupContext.toNegated())
|
|
309
389
|
});
|
|
@@ -312,7 +392,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
312
392
|
order: 20,
|
|
313
393
|
command: {
|
|
314
394
|
id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,
|
|
315
|
-
title: nls.localizeWithPath(
|
|
395
|
+
title: ( nls.localizeWithPath(
|
|
396
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
397
|
+
'closeOthers',
|
|
398
|
+
"Close Others"
|
|
399
|
+
))
|
|
316
400
|
},
|
|
317
401
|
when: ( OpenEditorsGroupContext.toNegated())
|
|
318
402
|
});
|
|
@@ -321,7 +405,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
321
405
|
order: 30,
|
|
322
406
|
command: {
|
|
323
407
|
id: CLOSE_SAVED_EDITORS_COMMAND_ID,
|
|
324
|
-
title: nls.localizeWithPath(
|
|
408
|
+
title: ( nls.localizeWithPath(
|
|
409
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
410
|
+
'closeSaved',
|
|
411
|
+
"Close Saved"
|
|
412
|
+
))
|
|
325
413
|
}
|
|
326
414
|
});
|
|
327
415
|
MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
@@ -329,7 +417,11 @@ MenuRegistry.appendMenuItem(MenuId.OpenEditorsContext, {
|
|
|
329
417
|
order: 40,
|
|
330
418
|
command: {
|
|
331
419
|
id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
|
|
332
|
-
title: nls.localizeWithPath(
|
|
420
|
+
title: ( nls.localizeWithPath(
|
|
421
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
422
|
+
'closeAll',
|
|
423
|
+
"Close All"
|
|
424
|
+
))
|
|
333
425
|
}
|
|
334
426
|
});
|
|
335
427
|
MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
|
|
@@ -363,7 +455,11 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
|
|
|
363
455
|
order: 20,
|
|
364
456
|
command: {
|
|
365
457
|
id: OPEN_WITH_EXPLORER_COMMAND_ID,
|
|
366
|
-
title: nls.localizeWithPath(
|
|
458
|
+
title: ( nls.localizeWithPath(
|
|
459
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
460
|
+
'explorerOpenWith',
|
|
461
|
+
"Open With..."
|
|
462
|
+
)),
|
|
367
463
|
},
|
|
368
464
|
when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ExplorerResourceAvailableEditorIdsContext)),
|
|
369
465
|
});
|
|
@@ -390,7 +486,11 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
|
|
|
390
486
|
order: 8,
|
|
391
487
|
command: {
|
|
392
488
|
id: CUT_FILE_ID,
|
|
393
|
-
title: nls.localizeWithPath(
|
|
489
|
+
title: ( nls.localizeWithPath(
|
|
490
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
491
|
+
'cut',
|
|
492
|
+
"Cut"
|
|
493
|
+
))
|
|
394
494
|
},
|
|
395
495
|
when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ExplorerResourceNotReadonlyContext))
|
|
396
496
|
});
|
|
@@ -487,7 +587,11 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
|
|
|
487
587
|
},
|
|
488
588
|
alt: {
|
|
489
589
|
id: DELETE_FILE_ID,
|
|
490
|
-
title: nls.localizeWithPath(
|
|
590
|
+
title: ( nls.localizeWithPath(
|
|
591
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
592
|
+
'deleteFile',
|
|
593
|
+
"Delete Permanently"
|
|
594
|
+
)),
|
|
491
595
|
precondition: ExplorerResourceNotReadonlyContext
|
|
492
596
|
},
|
|
493
597
|
when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ExplorerResourceMoveableToTrash))
|
|
@@ -497,84 +601,36 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
|
|
|
497
601
|
order: 20,
|
|
498
602
|
command: {
|
|
499
603
|
id: DELETE_FILE_ID,
|
|
500
|
-
title: nls.localizeWithPath(
|
|
604
|
+
title: ( nls.localizeWithPath(
|
|
605
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
606
|
+
'deleteFile',
|
|
607
|
+
"Delete Permanently"
|
|
608
|
+
)),
|
|
501
609
|
precondition: ExplorerResourceNotReadonlyContext
|
|
502
610
|
},
|
|
503
611
|
when: ( ContextKeyExpr.and(( ExplorerRootContext.toNegated()), ( ExplorerResourceMoveableToTrash.toNegated())))
|
|
504
612
|
});
|
|
505
613
|
for (const menuId of [MenuId.EmptyEditorGroupContext, MenuId.EditorTabsBarContext]) {
|
|
506
|
-
MenuRegistry.appendMenuItem(menuId, { command: { id: NEW_UNTITLED_FILE_COMMAND_ID, title: nls.localizeWithPath(
|
|
507
|
-
|
|
614
|
+
MenuRegistry.appendMenuItem(menuId, { command: { id: NEW_UNTITLED_FILE_COMMAND_ID, title: ( nls.localizeWithPath(
|
|
615
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
616
|
+
'newFile',
|
|
617
|
+
"New Text File"
|
|
618
|
+
)) }, group: '1_file', order: 10 });
|
|
619
|
+
MenuRegistry.appendMenuItem(menuId, { command: { id: 'workbench.action.quickOpen', title: ( nls.localizeWithPath(
|
|
620
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
621
|
+
'openFile',
|
|
622
|
+
"Open File..."
|
|
623
|
+
)) }, group: '1_file', order: 20 });
|
|
508
624
|
}
|
|
509
|
-
( MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
510
|
-
group: '1_new',
|
|
511
|
-
command: {
|
|
512
|
-
id: NEW_UNTITLED_FILE_COMMAND_ID,
|
|
513
|
-
title: nls.localizeWithPath('vs/workbench/contrib/files/browser/fileActions.contribution', { key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New Text File")
|
|
514
|
-
},
|
|
515
|
-
order: 1
|
|
516
|
-
}));
|
|
517
|
-
( MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
518
|
-
group: '4_save',
|
|
519
|
-
command: {
|
|
520
|
-
id: SAVE_FILE_COMMAND_ID,
|
|
521
|
-
title: nls.localizeWithPath('vs/workbench/contrib/files/browser/fileActions.contribution', { key: 'miSave', comment: ['&& denotes a mnemonic'] }, "&&Save"),
|
|
522
|
-
precondition: ( ContextKeyExpr.or(ActiveEditorContext, ( ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))))
|
|
523
|
-
},
|
|
524
|
-
order: 1
|
|
525
|
-
}));
|
|
526
|
-
( MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
527
|
-
group: '4_save',
|
|
528
|
-
command: {
|
|
529
|
-
id: SAVE_FILE_AS_COMMAND_ID,
|
|
530
|
-
title: nls.localizeWithPath('vs/workbench/contrib/files/browser/fileActions.contribution', { key: 'miSaveAs', comment: ['&& denotes a mnemonic'] }, "Save &&As..."),
|
|
531
|
-
precondition: ( ContextKeyExpr.or(ActiveEditorContext, ( ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))))
|
|
532
|
-
},
|
|
533
|
-
order: 2
|
|
534
|
-
}));
|
|
535
|
-
( MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
536
|
-
group: '4_save',
|
|
537
|
-
command: {
|
|
538
|
-
id: SAVE_ALL_COMMAND_ID,
|
|
539
|
-
title: nls.localizeWithPath('vs/workbench/contrib/files/browser/fileActions.contribution', { key: 'miSaveAll', comment: ['&& denotes a mnemonic'] }, "Save A&&ll"),
|
|
540
|
-
precondition: DirtyWorkingCopiesContext
|
|
541
|
-
},
|
|
542
|
-
order: 3
|
|
543
|
-
}));
|
|
544
|
-
( MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
545
|
-
group: '5_autosave',
|
|
546
|
-
command: {
|
|
547
|
-
id: ToggleAutoSaveAction.ID,
|
|
548
|
-
title: nls.localizeWithPath('vs/workbench/contrib/files/browser/fileActions.contribution', { key: 'miAutoSave', comment: ['&& denotes a mnemonic'] }, "A&&uto Save"),
|
|
549
|
-
toggled: ( ContextKeyExpr.notEquals('config.files.autoSave', 'off'))
|
|
550
|
-
},
|
|
551
|
-
order: 1
|
|
552
|
-
}));
|
|
553
|
-
( MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
554
|
-
group: '6_close',
|
|
555
|
-
command: {
|
|
556
|
-
id: REVERT_FILE_COMMAND_ID,
|
|
557
|
-
title: nls.localizeWithPath('vs/workbench/contrib/files/browser/fileActions.contribution', { key: 'miRevert', comment: ['&& denotes a mnemonic'] }, "Re&&vert File"),
|
|
558
|
-
precondition: ( ContextKeyExpr.or((
|
|
559
|
-
ContextKeyExpr.and(ActiveEditorCanRevertContext)), (
|
|
560
|
-
ContextKeyExpr.and(( ResourceContextKey.Scheme.notEqualsTo(Schemas.untitled)), FoldersViewVisibleContext, SidebarFocusContext)))),
|
|
561
|
-
},
|
|
562
|
-
order: 1
|
|
563
|
-
}));
|
|
564
|
-
( MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|
565
|
-
group: '6_close',
|
|
566
|
-
command: {
|
|
567
|
-
id: CLOSE_EDITOR_COMMAND_ID,
|
|
568
|
-
title: nls.localizeWithPath('vs/workbench/contrib/files/browser/fileActions.contribution', { key: 'miCloseEditor', comment: ['&& denotes a mnemonic'] }, "&&Close Editor"),
|
|
569
|
-
precondition: ( ContextKeyExpr.or(ActiveEditorContext, ( ContextKeyExpr.and(FoldersViewVisibleContext, SidebarFocusContext))))
|
|
570
|
-
},
|
|
571
|
-
order: 2
|
|
572
|
-
}));
|
|
573
625
|
MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
574
626
|
group: '3_global_nav',
|
|
575
627
|
command: {
|
|
576
628
|
id: 'workbench.action.quickOpen',
|
|
577
|
-
title: nls.localizeWithPath(
|
|
629
|
+
title: ( nls.localizeWithPath(
|
|
630
|
+
'vs/workbench/contrib/files/browser/fileActions.contribution',
|
|
631
|
+
{ key: 'miGotoFile', comment: ['&& denotes a mnemonic'] },
|
|
632
|
+
"Go to &&File..."
|
|
633
|
+
))
|
|
578
634
|
},
|
|
579
635
|
order: 1
|
|
580
636
|
});
|