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 33352 - [TTV] Bugs in selections in TreeTreeView | ExplorerManager
Summary: [TTV] Bugs in selections in TreeTreeView | ExplorerManager
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2003-05-02 10:52 UTC by Ondrej Rypacek
Modified: 2008-12-22 20:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a demo program (3.25 KB, text/plain)
2003-05-25 20:41 UTC, Jiri Rechtacek
Details
a help code for investigate (1.44 KB, patch)
2003-06-01 22:45 UTC, Jiri Rechtacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Rypacek 2003-05-02 10:52:37 UTC
I hook the ExplorerManager of a BeanTreeView to
listen for PROP_SELECTED_NODES change. But when I
try to click the view with CTRL pressed, 
a) the event is sent only for some nodes. 
b) the set if nodes for which it works change -
for a while, the event is fired for some, then
after some more clicking some other ones start to
work and others stop
c) when clicking with CTRL held down, sometimes it
goes all wrong - nothing selected, click one and
several get selected at once

It looks like the ExplMan is out of sync with the
view. It probably holds some internal state of the
selection, but this state does not agree with the
selection displayed in the view.
Comment 1 Jiri Rechtacek 2003-05-24 14:00:37 UTC
Ondro, I evaluate ASAP what's wrong.
Comment 2 Jiri Rechtacek 2003-05-25 20:41:22 UTC
Created attachment 10439 [details]
a demo program
Comment 3 Jiri Rechtacek 2003-05-25 20:42:29 UTC
I don't see what's wrong. The selection changes in JTree are correctly
propagated to ExplorerManager and followup fired outside, for me it
looks ok. I attached a simple program, it listens on ExplorerManager
and prints a content of this property. Could you reproduce this
problem with the attached program? Or could attach any program which
can demonstrate it? I left it open for now. Pls. attach a comment. Thanks
Comment 4 Ondrej Rypacek 2003-05-27 10:32:55 UTC
I didn't reproduced it in your demo test, but I did in JarPackager but
also in the Options dialog in projects. I didn't manage to find any
regularity of when it appears, but when I click it for some time, it
appears. 

Just give me a call when it suits you and I'll show you. I've probably
got the right clicking pattern ;-)
Comment 5 Jiri Rechtacek 2003-06-01 22:45:21 UTC
Created attachment 10551 [details]
a help code for investigate
Comment 6 Jiri Rechtacek 2003-06-01 22:57:10 UTC
I attached a code for deeply investigation. There are println from
TreeView's TreeSelectionListener and from ExplorerManager's
PropertyChangeListener. You could see the content of native JTree's
selection paths and compare with value of PROP_SELECTED_NODES in
ExplorerManager. Pls. send a result of your scrutiny. Thanks
Comment 7 Ondrej Rypacek 2003-06-02 11:47:47 UTC
I tried it with your patch and found out that *selection in TreeView
and ExplorerManager are the same, but it the nodes don't appear to be
selected*. At some point , even that the TV correctly deselects as I
click , the internal state ov TV and EM incorrectly indicates that the
node is still selected. Simply put, there's a difference between what
is kept internally (inside TV and EM) and what is shown on the screen.

The logic of selections is correct with respect to *what is seen*,
only from time to time the internal state of the selection is
displayed -- that appears as *one click -> many selections at once*.
But internally it is wildly out of sync.

Comment 8 Jiri Rechtacek 2003-06-03 12:45:23 UTC
I'm sure. The prints in TreeView display a state from
TreeSelectionListener attched on JTree, prints the content of
TreeSelectionEvent. Do you want to say that JTree wrongly fires
selection changes? I suppose: not. Could you more precise problem or
call me home?
Comment 9 Jiri Rechtacek 2003-06-03 13:51:22 UTC
There are discrepancies in visible selection in TreeTableView and
content of PROP_SELECTED_NODES. It is maybe regression of issue 32462.
Comment 10 Jiri Rechtacek 2003-06-04 22:12:54 UTC
I reverted fix of 32462; now it should bahave same as in nb3.5.
Comment 11 Lukas Hasik 2004-02-25 14:50:19 UTC
verified