Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 194356 - Unify codes for next/prev occurrence
Unify codes for next/prev occurrence
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Key bindings
7.0
PC All
: P3 (vote)
: 8.2
Assigned To: apireviews
issues@editor
: API, API_REVIEW_FAST
: 209029 (view as bug list)
Depends on:
Blocks: 227602
  Show dependency treegraph
 
Reported: 2011-01-14 16:08 UTC by Jaromir Uhrik
Modified: 2016-02-12 02:36 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Screenshot attached... (98.30 KB, image/png)
2011-01-14 16:08 UTC, Jaromir Uhrik
Details
Proposed changes (30.58 KB, patch)
2015-05-19 08:16 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2011-01-14 16:08:19 UTC
Created attachment 105002 [details]
Screenshot attached...

Product Version: NetBeans IDE Dev (Build 201012160001)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)

I cannot invoke scroll up/down action from keyboard. It is because there are 2 actions that use Ctrl+Up/Down shortcut (Navigate to Previous/Next Occurence and Scroll Up/Down). The Scroll Up/Down calling is shadowed by the Navigate to Previous/Next Occurence when pressing the shortcut.
Comment 1 David Strupl 2011-01-18 08:21:30 UTC
This is strange I have default setup on Mac and Next Occurrence is Meta-G. What is your keyboard profile?
Comment 2 Jaromir Uhrik 2011-01-18 09:14:40 UTC
It is reproducible on the Mac machine of the colleague too. Here are the steps to reproduce:
-download latest .zip with netbeans (j2se distribution of 201101180000)
-unzip and start with clear userdir
-create new j2se project
-push Ctrl+Up
-->> in the status line there appears "There is no ocurrence to navigate to". So that it is clear that Ctrl+Up/Down shortcut calls the Previous/Next occurence. The required behavior is to scroll Up/Down.
Comment 3 David Strupl 2011-01-18 14:25:23 UTC
http://hg.netbeans.org/jet-main/rev/a683d61031a9
Comment 4 Vladimir Voskresensky 2011-01-18 18:06:05 UTC
David, have a look at issue #125741
As you know we have not two, but in much more [1] actions with the same name (if all languages are ON)
May be it's a good time to fix issue #125741?

[1]
./cnd.highlight/src/org/netbeans/modules/cnd/highlight/resources/DefaultKeyBindings.xml:50:    <bind actionName="cpp-prev-marked-occurrence" key="O-UP"/>
./cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/Bundle.properties:45:cpp-prev-marked-occurrence=Navigate to Previous Occurrence
./cnd.highlight/src/org/netbeans/modules/cnd/highlight/semantic/actions/GotoPrevOccurrenceAction.java:59:    private static final String actionName = "cpp-prev-marked-occurrence"; // NOI18N
./csl.api/src/org/netbeans/modules/csl/api/Bundle.properties:16:csl-prev-marked-occurrence=Navigate to Previous Occurrence
./csl.api/src/org/netbeans/modules/csl/api/GoToMarkOccurrencesAction.java:85:    private static final String prevActionName = "csl-prev-marked-occurrence"; // NOI18N
./csl.api/build/classes/org/netbeans/modules/csl/api/Bundle.properties:16:csl-prev-marked-occurrence=Navigate to Previous Occurrence
./html.editor/src/org/netbeans/modules/html/editor/resources/DefaultKeyBindings.xml:53:    <bind actionName="csl-prev-marked-occurrence" key="O-UP"/>
./html.editor/build/classes/org/netbeans/modules/html/editor/resources/DefaultKeyBindings.xml:53:    <bind actionName="csl-prev-marked-occurrence" key="O-UP"/>
./java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings-Mac.xml:64:    <bind actionName="java-prev-marked-occurrence" key="O-UP"/>
./java.editor/src/org/netbeans/modules/java/editor/resources/DefaultKeyBindings.xml:69:    <bind actionName="java-prev-marked-occurrence" key="O-UP"/>
./java.editor/src/org/netbeans/modules/java/editor/resources/layer.xml:285:                    <file name="java-prev-marked-occurrence.instance">
./java.editor/src/org/netbeans/modules/java/editor/semantic/Bundle.properties:61:java-prev-marked-occurrence=Navigate to Previous Occurrence
./java.editor/src/org/netbeans/modules/java/editor/semantic/GoToMarkOccurrencesAction.java:73:    private static final String prevActionName = "java-prev-marked-occurrence"; // NOI18N
./javascript.editing/src/org/netbeans/modules/javascript/editing/DefaultKeyBindings.xml:56:    <bind actionName="csl-prev-marked-occurrence" key="O-UP"/>
./javascript.editing/build/classes/org/netbeans/modules/javascript/editing/DefaultKeyBindings.xml:56:    <bind actionName="csl-prev-marked-occurrence" key="O-UP"/>
./php.editor/src/org/netbeans/modules/php/editor/resources/DefaultKeyBindings-Mac.xml:57:    <bind actionName="csl-prev-marked-occurrence" key="O-UP"/>
./php.editor/src/org/netbeans/modules/php/editor/resources/DefaultKeyBindings.xml:56:    <bind actionName="csl-prev-marked-occurrence" key="O-DOWN"/>
./ruby/src/org/netbeans/modules/ruby/DefaultKeyBindings-Mac.xml:64:    <bind actionName="csl-prev-marked-occurrence" key="O-UP"/>
./ruby/src/org/netbeans/modules/ruby/DefaultKeyBindings.xml:58:    <bind actionName="csl-prev-marked-occurrence" key="O-UP"/>
Comment 5 Jaromir Uhrik 2011-01-27 09:22:19 UTC
I am reopening because I can still reproduce in the following build:

Product Version: NetBeans IDE Dev (Build 201101270001)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)
Comment 6 Vladimir Voskresensky 2011-01-27 09:34:44 UTC
Jaromir you are right and it's because of issue #125741
A lot of languages register the same shortcuts for the same action
Comment 7 Svata Dedic 2012-03-23 09:35:11 UTC
*** Bug 209029 has been marked as a duplicate of this bug. ***
Comment 8 Svata Dedic 2013-03-18 14:59:37 UTC
This isn't specific to Macs, right ?
Comment 9 Tomas Mysik 2013-03-18 15:27:47 UTC
No.
Comment 10 Svata Dedic 2015-05-19 08:16:39 UTC
Created attachment 153742 [details]
Proposed changes

Please review the attached patch. The API change is a simple addition of action IDs to EditorActionNames (editor.lib2 module). 
The other changes clean up layer or binding files in modules which I've found to define next/prev occurrences actions. 

After the change, all actions appear as one entry in the Tools | Options and are configured
Comment 11 Vladimir Voskresensky 2015-05-21 13:19:10 UTC
VV1: Is it really necessary that each module still have to define display names in own Bundle.properties? Could you define display name in editor module as well?
Comment 12 Svata Dedic 2015-09-21 11:38:46 UTC
(In reply to Vladimir Voskresensky from comment #11)
> VV1: Is it really necessary that each module still have to define display
> names in own Bundle.properties? Could you define display name in editor
> module as well?

Seems necessary as actions initialize superclass using their display name. Each of the affected modules defines its own implementation of the action, so the implementation is in charge of loading the localized string; resources are classloader-based.
Comment 13 Svata Dedic 2016-01-29 16:54:01 UTC
Finally implemented in jet-main#357c9c9c36fe
editor.lib2 spec bumped to 2.6
Comment 14 Quality Engineering 2016-02-12 02:36:49 UTC
Integrated into 'main-silver', will be available in build *201602120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/357c9c9c36fe
User: Svata Dedic <sdedic@netbeans.org>
Log: #194356: unified next/prev err occurrence action names


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