Bug 211524 - Ctrl-R to invoke ActionProvider.COMMAND_RENAME when context is a Project
Ctrl-R to invoke ActionProvider.COMMAND_RENAME when context is a Project
Product: editor
Classification: Unclassified
Component: Refactoring
All All
: P3 (vote)
Assigned To: Jan Becicka
Depends on:
Blocks: 211573
  Show dependency treegraph
Reported: 2012-04-20 15:56 UTC by _ gtzabari
Modified: 2016-07-07 19:49 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
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

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.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo