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 164252 - Caret jumps to the top of the file when using Navigator
Summary: Caret jumps to the top of the file when using Navigator
Status: VERIFIED DUPLICATE of bug 168738
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-30 23:41 UTC by Petr Dvorak
Modified: 2009-11-13 12:04 UTC (History)
1 user (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 Petr Dvorak 2009-04-30 23:41:27 UTC
Product Version: NetBeans IDE 6.7 Beta (Build 200904242137)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02
System: Linux version 2.6.28-11-generic running on amd64; UTF-8; en_US (nb)

There is a very annoying issue when using a navigator on a modified file.

1. Open some long Java file, make sure the Navigator window is opened
2. Scroll approx. to the middle of the file
3. Do some minor modification (type space somewhere)
4. Double-click any method in the Navigator
-> You are navigated to the top of the file, not to the method you doubleclicked
Comment 1 Alexey Butenko 2009-05-05 10:11:48 UTC
It is generated by fix for issue 160478. (see changeset #0871113eeaa3)
getOffset method will return 0 offset when scanning in progress.
Workaround is to wait a bit after some change made and then navigate to desired method.
Comment 2 Alexey Butenko 2009-05-05 10:44:30 UTC
passing to source for evaluation, since it is about 
getOffset from org.netbeans.api.java.source.ui.ElementOpen
Comment 3 Jan Jancura 2009-05-11 12:26:41 UTC
Reproducible.
Comment 4 devon_c_miller 2009-06-23 18:46:56 UTC
As of RC3, I am still seeing this behavior.

This behavior does not appear to be time related.

If I have changed the file at all, since opening it, a double-click in Navigator moves to the top of the file.

This appear to be related to the Navigator gaining focus. Once the Navigator has had focus for ~1 second, a double-click
will work correctly.

Try the following:
1. Open some long Java file, make sure the Navigator window is opened
2. Scroll approx. to the middle of the file
3. Do some minor modification (type space somewhere)
4. Single-click any method in the Navigator
5. Wait ~1 second
6. Double-click any method in navigator
-> You are navigated to the proper function

If the wait (#5) is less than a second, the double click will move to the top of the file.

Does the Navigator kick off a scan when it gains focus?
Comment 5 Petr Dvorak 2009-07-02 13:33:44 UTC
Is there any chance to fix this in 6.7.1? This is EXTREMELY annoying issue...
Comment 6 Jan Jancura 2009-09-15 12:16:09 UTC

*** This issue has been marked as a duplicate of 168738 ***