Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Register Nuclide File Tree: Rename/Delete commands at workspace level #1433

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/nuclide-file-tree/lib/FileTreeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,10 @@ export default class FileTreeController {
'nuclide-file-tree:open-selected-entry-right': this._openSelectedEntrySplitRight.bind(
this,
),
'nuclide-file-tree:remove': this._deleteSelection.bind(this),
'core:delete': this._deleteSelection.bind(this),
'nuclide-file-tree:remove-project-folder-selection': this._removeRootFolderSelection.bind(
this,
),
'nuclide-file-tree:rename-selection': () =>
FileSystemActions.openRenameDialog(),
'nuclide-file-tree:duplicate-selection': () => {
FileSystemActions.openDuplicateDialog(
this._openAndRevealFilePaths.bind(this),
Expand All @@ -203,6 +200,9 @@ export default class FileTreeController {
'file:copy-full-path': this._copyFullPath.bind(this),
// eslint-disable-next-line rulesdir/atom-apis
'file:show-in-file-manager': this._showInFileManager.bind(this),
'nuclide-file-tree:rename-selection': () =>
FileSystemActions.openRenameDialog(),
'nuclide-file-tree:remove': this._deleteSelection.bind(this),
}),
);
if (state != null) {
Expand Down
8 changes: 8 additions & 0 deletions pkg/nuclide-file-tree/menus/nuclide-file-tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
{
"label": "New File...",
"command": "nuclide-file-tree:add-file-relative"
},
{
"label": "Rename Active File...",
"command": "nuclide-file-tree:rename-selection"
},
{
"label": "Delete Active File",
"command": "nuclide-file-tree:remove"
}
]
}
Expand Down