This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 211524

Summary: Ctrl-R to invoke ActionProvider.COMMAND_RENAME when context is a Project
Product: editor Reporter: _ gtzabari <gtzabari>
Component: RefactoringAssignee: Jan Becicka <jbecicka>
Status: REOPENED ---    
Severity: normal CC: jglick
Priority: P3 Keywords: USABILITY
Version: 7.1.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 211573    

Description _ gtzabari 2012-04-20 15:56:23 UTC
Netbeans 7.1.1

When I invoke CTRL+R with a Maven Java program being in focus I get "The Rename refactoring cannot be applied in this context". However, if I right-click on the project and select "Rename" I am presented with a dialog for:

1. Renaming the project display name
2. Renaming the artifactId
3. Renaming the project folder

Expected behavior: CTRL+R should map to the project's context-sensitive Rename operation.
Comment 1 Jesse Glick 2012-04-20 16:07:10 UTC
Ctrl-R is for Refactor > Rename, dealing with source code. Project renames are not associated with this system at all.
Comment 2 _ gtzabari 2012-04-20 16:36:23 UTC
Jesse,

I understand what it is currently bound to. This enhancement request is for making the keyboard shortcut context-sensitive. Meaning, when source-code is focused use source-code refactoring, when a project is selected use project refactoring.

I think implementing this feature would enhance usability. There is also the precedence of CTRL+F in the editor searching a single file whereas CTRL+F on a project searching the entire project. Please consider reopening the issue.
Comment 3 Jesse Glick 2012-04-20 17:02:47 UTC
ActionsImplementationFactory.doRename could check for a Project instance. Could perhaps also be implemented by a ActionsImplementationProvider; not clear to me whether that would best live in refactoring.api or projectui. (The former would avoid a new dep.)

Same, perhaps, for "copy" and "move" actions. "Delete" is a little uncomfortable since this is labeled "Safely Delete" in the UI, which is not exactly appropriate for COMMAND_DELETE which generally makes no attempt to check for inbound references.
Comment 4 Martin Balin 2016-07-07 07:29:59 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 5 _ gtzabari 2016-07-07 19:49:23 UTC
Still an issue in dev build 201607060002.