Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 250815 - Shortcuts are missing for refactoring actions
Shortcuts are missing for refactoring actions
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Refactoring
8.0.2
All Linux
: P2 (vote)
: 8.1
Assigned To: Ralph Ruijs
issues@java
:
: 244033 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-02 12:33 UTC by Ralph Ruijs
Modified: 2015-05-19 10:54 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Screenshot of new shortcuts (77.36 KB, image/png)
2015-03-02 12:41 UTC, Ralph Ruijs
Details
Patch adding the shortcuts to refactoring.api, refactoring.java and java.hints (17.65 KB, patch)
2015-03-02 12:59 UTC, Ralph Ruijs
Details | Diff
Compare Eclipse/Idea/NBProposal (192.31 KB, image/png)
2015-03-02 19:14 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Ruijs 2015-03-02 12:33:48 UTC
The refactoring actions have no shortcut by default.
Comment 1 Ralph Ruijs 2015-03-02 12:41:38 UTC
Created attachment 152317 [details]
Screenshot of new shortcuts

Having a limited number of keyboard keys and no support for nested shortcuts like "CTRL-R, R", attached imaged shows the keyboard shortcuts we can give to the refactoring actions.

ALT-SHIFT+* will introduce something
CTRL-ALT-SHIFT+* will "refactor" something


and then there are some exceptions like CTRL+R or ALT+F7.


Please tell me what you think :)
Comment 2 Ralph Ruijs 2015-03-02 12:59:54 UTC
Created attachment 152319 [details]
Patch adding the shortcuts to refactoring.api, refactoring.java and java.hints
Comment 3 markiewb 2015-03-02 19:14:37 UTC
Created attachment 152331 [details]
Compare Eclipse/Idea/NBProposal

IMHO: NO. Don't do it. No one ever will remember more shortcuts for refactorings you do not use everyday. 

I attached a screenshot, which compares it with Eclipse and Idea.
Comment 4 Geertjan Wielenga 2015-03-02 19:18:09 UTC
Yes, Eclipse sucks, but that doesn't mean we should! We do need to move away from using the mouse and more towards letting people use the keyboard and this excellent proposal is a great step in that direction.
Comment 5 _ tboudreau 2015-03-02 19:20:47 UTC
It's not a question of people remembering *every* shortcut - but everyone finds ones that *they* use regularly, and it's perfectly possible to learn the shortcuts for the tools you use regularly.

So the idea that nobody will memorize *all* of them doesn't mean nobody will memorize *any* of them.

For Idea users, it might be nice if where possible we copied their shortcuts.
Comment 6 Ralph Ruijs 2015-03-02 19:38:42 UTC
(In reply to _ tboudreau from comment #5)
> <snip>
> 
> For Idea users, it might be nice if where possible we copied their shortcuts.

I think where possible we have the same shortcuts as idea. Please tell me if I missed one and I'll update it.
Comment 7 Ralph Ruijs 2015-03-02 19:41:01 UTC
(In reply to markiewb from comment #3)
> Created attachment 152331 [details]
> Compare Eclipse/Idea/NBProposal
> 
> IMHO: NO. Don't do it. No one ever will remember more shortcuts for
> refactorings you do not use everyday. 
> 
> I attached a screenshot, which compares it with Eclipse and Idea.

I agree not many will remember them all and therefor we could argue if it is necessary to add them, but do you see any harm in adding the shortcuts?
Comment 8 markiewb 2015-03-02 19:45:28 UTC
(In reply to Ralph Ruijs from comment #7)
> 
> I agree not many will remember them all and therefor we could argue if it is
> necessary to add them, but do you see any harm in adding the shortcuts?

You can add them as you like. Are there no conflicts with shortcuts from other modules?
Comment 9 Geertjan Wielenga 2015-03-03 07:17:05 UTC
I'm looking forward to making new screencasts about refactoring, where I'll be able to now use keyboard shortcuts only. Really cool.
Comment 10 Ralph Ruijs 2015-03-03 14:25:07 UTC
(In reply to markiewb from comment #8)
>
> You can add them as you like. Are there no conflicts with shortcuts from
> other modules?

There was one conflict with the action Threads History. I moved Extract Superclass and Extract Interface to CTRL-ALT-SHIFT + S and CTRL-ALT-SHIFT + T.

http://hg.netbeans.org/jet-main/rev/3b7d8afe8d16
Comment 11 Quality Engineering 2015-03-04 03:57:50 UTC
Integrated into 'main-silver', will be available in build *201503040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3b7d8afe8d16
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #250815 - Shortcuts are missing for refactoring actions
Comment 12 markiewb 2015-05-03 17:23:00 UTC
*** Bug 244033 has been marked as a duplicate of this bug. ***
Comment 13 Alexander Simon 2015-05-19 10:54:26 UTC
Probably change:
-------------------8<------------------
@@ -59,7 +60,10 @@
  */
 @ActionID(id = "org.netbeans.modules.refactoring.java.api.ui.ChangeParametersAction", category = "Refactoring")
 @ActionRegistration(displayName = "#LBL_ChangeMethodSignatureAction", lazy = false)
-@ActionReference(path = "Editors/text/x-java/RefactoringActions" , name = "CallHierarchyAction", position = 430)
+@ActionReferences({
+    @ActionReference(path = "Editors/text/x-java/RefactoringActions", name = "CallHierarchyAction", position = 430),
+    @ActionReference(path = "Shortcuts", name = "OCS-C")
+})
 public class ChangeParametersAction extends JavaRefactoringGlobalAction {
-------------------8<------------------
has a typo?
See: name = "CallHierarchyAction"
And according to proposal shortcut should be OCS-M.


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