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 196977 - Java debugger hot keys are hardwired
Summary: Java debugger hot keys are hardwired
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 198191 (view as bug list)
Depends on:
Blocks: 152576
  Show dependency tree
 
Reported: 2011-03-22 16:37 UTC by tbrunhoff
Modified: 2011-05-04 16:01 UTC (History)
4 users (show)

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 tbrunhoff 2011-03-22 16:37:44 UTC
I have a keyboard mapping for step over (F10) and step into (F11) which work correctly in c++ debugging, but in java debugging they appear to be hardwired to shift-F8 and F7, respectively. This is similar to another hardwired keyboard problem in Bug 195683.

Product Version: NetBeans Platform Dev (Build 201103040000)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.35.10-74.fc14.x86_64 running on i386; UTF-8; en_US (test)
Userdir: /home/toddb/.netbeans/dev
Comment 1 tbrunhoff 2011-03-22 16:48:38 UTC
But I have to note that sometimes the mappings ok. Perhaps, like Bug 195683 it has to do with window focus. If I am careful to click on the editor pane first, then the mappings are in effect.
Comment 2 Martin Entlicher 2011-03-22 17:09:22 UTC
I've reproduced that sometimes the shortcuts do not fully switch.
Probably a general problem of NetBeans actions.
Comment 3 Martin Entlicher 2011-04-01 14:27:21 UTC
Either the query for "originalFile" attribute at NbKeymap.java:399 is wrong (if it's removed and the FileObject is resolved via DataShadow it fixes this issue), or filesystems do not work correctly with "originalFile" attribute.

To reproduce:
1) Switch F7 and F8 actions (change F7 to Step Over and F8 to Step Into).
2) NbKeymap.java:399 tries to find f.getAttribute("originalFile");
   where f = "Keymaps/NetBeans/F7.shadow"
3) MultiFileObject.getAttribute("originalFile", "Keymaps/NetBeans/F7.shadow")
   is called
4) The system iterates to AbstractFileObject which resides on /home/martin/.netbeans/dev/config[org.netbeans.core.startup.layers.LocalFileSystemEx@b8501d]
5) DefaultAttributes.java:385 - readAttribute( "Keymaps/NetBeans/F7.shadow", "originalFile" ) - returns null
   But the original file is in the *content* of the FileObject, not in any attribute!
6) Iterations continue on 19 more filesystems and somewhere it finds "Actions/Debug/org-netbeans-modules-debugger-ui-actions-StepIntoAction.instance", which is the *originally assigned value* but NOT the link where the shadow points to.

Please evaluate in filesystems...
Comment 4 Martin Entlicher 2011-04-01 14:28:27 UTC
FYI: bug #195683 has probably the same cause.
Comment 5 Jaroslav Tulach 2011-04-06 13:04:52 UTC
This is not problem in filesystems, if the value is inside of the file, then there is no reason why originalFile attribute should return it.

The logic of using content or originalFile attribute is in DataShadow, but NbKeymap bypasses it: ergonomics#d279a1512d7a
Comment 6 Jesse Glick 2011-04-06 13:27:11 UTC
Confusing that DataShadow.writeShadowFile stores its path in the file contents, when declarative shadows always use the originalFile attribute. Would be better to pick one format and deprecate the others.
Comment 7 Quality Engineering 2011-04-07 08:45:32 UTC
Integrated into 'main-golden', will be available in build *201104070400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d279a1512d7a
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #196977: Use DataShadow for non-empty files
Comment 8 Jesse Glick 2011-05-04 16:01:00 UTC
*** Bug 198191 has been marked as a duplicate of this bug. ***