diff --git a/pkg/nuclide-file-tree/lib/FileTreeController.js b/pkg/nuclide-file-tree/lib/FileTreeController.js index 0d2d8b60d0..3835c57dda 100644 --- a/pkg/nuclide-file-tree/lib/FileTreeController.js +++ b/pkg/nuclide-file-tree/lib/FileTreeController.js @@ -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), @@ -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) { diff --git a/pkg/nuclide-file-tree/menus/nuclide-file-tree.json b/pkg/nuclide-file-tree/menus/nuclide-file-tree.json index 0b9ca2e766..a7654d6977 100644 --- a/pkg/nuclide-file-tree/menus/nuclide-file-tree.json +++ b/pkg/nuclide-file-tree/menus/nuclide-file-tree.json @@ -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" } ] }