提交 ff822422 编写于 作者: I isidor

explorer: copy path and copy relative path to their own groups

上级 b555eb88
...@@ -115,7 +115,7 @@ const PASTE_FILE_ID = 'filesExplorer.paste'; ...@@ -115,7 +115,7 @@ const PASTE_FILE_ID = 'filesExplorer.paste';
KeybindingsRegistry.registerCommandAndKeybindingRule({ KeybindingsRegistry.registerCommandAndKeybindingRule({
id: PASTE_FILE_ID, id: PASTE_FILE_ID,
weight: KeybindingWeight.WorkbenchContrib + explorerCommandsWeightBonus, weight: KeybindingWeight.WorkbenchContrib + explorerCommandsWeightBonus,
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext), when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext, FileCopiedContext),
primary: KeyMod.CtrlCmd | KeyCode.KEY_V, primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
handler: pasteFileHandler handler: pasteFileHandler
}); });
...@@ -441,20 +441,20 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { ...@@ -441,20 +441,20 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
command: { command: {
id: PASTE_FILE_ID, id: PASTE_FILE_ID,
title: PASTE_FILE_LABEL, title: PASTE_FILE_LABEL,
precondition: FileCopiedContext precondition: ContextKeyExpr.and(ExplorerResourceNotReadonlyContext, FileCopiedContext)
}, },
when: ExplorerFolderContext when: ExplorerFolderContext
}); });
MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
group: '5_cutcopypaste', group: '6_copypath',
order: 30, order: 30,
command: copyPathCommand, command: copyPathCommand,
when: ResourceContextKey.IsFileSystemResource when: ResourceContextKey.IsFileSystemResource
}); });
MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
group: '5_cutcopypaste', group: '6_copypath',
order: 30, order: 30,
command: copyRelativePathCommand, command: copyRelativePathCommand,
when: ResourceContextKey.IsFileSystemResource when: ResourceContextKey.IsFileSystemResource
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册