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 201014 - Ctrl+R as a shortcut for (instant) rename
Summary: Ctrl+R as a shortcut for (instant) rename
Status: RESOLVED DUPLICATE of bug 206879
Alias: None
Product: editor
Classification: Unclassified
Component: Key bindings (show other bugs)
Version: 7.0.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2011-08-16 18:16 UTC by matthies
Modified: 2012-03-22 10:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2011-08-16 18:16:31 UTC
In NetBeans 6.9 and earlier, Ctrl+R was the default shortcut for both "Instant Rename" and "Rename... (Refactor)". The former is for renaming (whether "instant" or not) from within the editor, the latter for renaming a class from the Project or Files view. Now in NetBeans 7, it's not possible any more to set Ctrl+R for both. The Keymap options dialog doesn't allow any more to set the same shortcut for two different actions, even if their scopes do not conflict.

I think it would make sense to have only one Rename action (in the Refactor or Source category) which would work both in the editor as well as for renaming a class in the Projects and Files view. "Instant Rename" already does non-instant rename if necessary, so just calling it "Rename" and merging it with "Rename... (Refactor)" would appear to do the job.
Comment 1 Jan Becicka 2011-08-24 14:14:12 UTC
I don't understand this report. Ctrl-R does work as expected. It invokes instant rename, if the change is local and it invokes full rename in other cases.
Comment 2 matthies 2011-08-24 17:27:06 UTC
Please re-read the report, I think it's clear. This is about two different actions available in the Keymap options dialog, whose functionalities used to share the same keyboard shortcut in 6.9, but now in 7.0 can't be assigned the same keyboard shortcut any more.

I think you're talking about the rename action in the editor, but as stated there is a different rename action for the Project/Files view. And in 7.0 they can't both have Ctrl+R assigned.
Comment 3 Svata Dedic 2011-09-29 16:04:02 UTC
I believe it was impossible to assign the same key binding to multiple actions starting with NB 6.7 release, see defect #86806.

The key binding configuration does not really understand 'scopes' (= different mapping sets for e.g. different types of focused windows), the categories shown in the list just group the actions semantically - it's not really a scope and cannot be used that way.

Could be fixed in next release by changing the prompt to warn the user, but potentially allow the duplicity - or implement scope support so the configuration UI can better analyse conflicts.
Comment 4 Svata Dedic 2012-03-22 10:34:10 UTC
Fixed as part of #206879

*** This bug has been marked as a duplicate of bug 206879 ***