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 65795 - [50cat] Ant navigator: scroll position reset after attempted selection after moving to another tab and back
Summary: [50cat] Ant navigator: scroll position reset after attempted selection after ...
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 120770 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-04 04:21 UTC by rrochat
Modified: 2009-10-22 19:36 UTC (History)
5 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 rrochat 2005-10-04 04:21:59 UTC
[ BUILD # : 200509261930 ]
[ JDK VERSION : 1.5.0_05 ]

Summary: Navigator does not always display the correct view of its apparent internal state, so what-you-see-is-not-what-you-get when selecting.

To reproduce:
1. Open nbbuild/build.xml in the editor. 
2. Double-click the target "real-clean" in the Navigator (so both windows are synced and scrolled down).
3. Click on some other editor tab.
4. Click back on the nbbuild/build.xml tab.  You will see the Navigator window restored so that real-clean is visible.  Try to click on it in the Navigator pane.
As soon as the mouse button is pressed,   
the Navigator window immediately scrolls to the beginning and the selection changes.
Comment 1 Jan Chalupa 2005-10-04 07:46:13 UTC
Assigning to core/navigator. Dafe, please re-assign as needed.
Comment 2 David Simonek 2005-10-04 15:08:12 UTC
Yes, reproduced, confirmed. I guess bug in Ant navigator support, passing.
Comment 3 Jesse Glick 2005-10-04 17:07:39 UTC
Can reproduce. No idea what causes it; could be a bug in ListView or something.
AntNavigatorPanel is not doing anything unusual to my knowledge. For me, after
clicking back to build.xml, actually the first target ("all") is selected,
though the scroll position still shows real-clean. But then in a different test,
real-clean *was* selected after switching back. I don't know what causes it to
behave one way or the other.

Does not occur when using Nav in sliding mode; Ctrl-7 rescrolls to top.

view.getViewport().scrollRectToVisible(new Rectangle());

does not help. Do not know what cause is or how to solve.
Comment 4 zign 2005-10-05 19:17:56 UTC
Downloaded build 200510031800 and the problem seems to be solved.
Comment 5 zign 2005-10-05 19:27:36 UTC
It's not solved in build 200510031800.
Sorry about last comment.
Comment 6 Jesse Glick 2007-06-13 01:44:36 UTC
Cf. issue #97169.
Comment 7 tomwheeler 2008-10-13 04:29:52 UTC
BTW, this exists in the latest daily builds (e.g. 200810111401).  As anyone who works with Ant (which is hard to avoid
when using NetBeans) knows, this may be minor but it's really annoying.  

This affects the navigator component for any Ant build file across multiple platforms, JREs and platforms.  
Comment 8 Jesse Glick 2008-11-07 04:06:22 UTC
I've disabled automatic selection of the first list element when there is otherwise no selection, which may help. I only
use Navigator in sliding mode and using keyboard only (using typeahead find) so I have little feel for how mouse users
expect it to work. Contributions welcome.

core-main #b3bc8fd31cbe
Comment 9 Quality Engineering 2008-11-07 16:17:23 UTC
Integrated into 'main-golden', will be available in build *200811071401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b3bc8fd31cbe
User: Jesse Glick <jglick@netbeans.org>
Log: #65795: do not rescroll navigator window.
Comment 10 Jesse Glick 2009-01-14 15:42:24 UTC
If people experiencing this can verify the fix (VERIFIED) in 7.0 Milestone 1 or dev builds, this may be a
65fixes3-candidate.
Comment 11 tomwheeler 2009-01-15 18:40:15 UTC
Verified under the following configuration:

    Product Version: NetBeans IDE Dev (Build 200901150201)
    Java: 1.6.0_10; Java HotSpot(TM) Server VM 11.0-b15
    System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 12 Jesse Glick 2009-01-15 18:42:26 UTC
Thanks! We'll see if it is accepted.
Comment 13 Jesse Glick 2009-02-24 21:23:49 UTC
release65_fixes #1758fb6cc00d
Comment 14 Jesse Glick 2009-10-22 19:36:48 UTC
*** Issue 120770 has been marked as a duplicate of this issue. ***