wrong synchronization of OutlineViews that share a single ExplorerManager

"michael.kuettner" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
My application has multiple OutlineViews that share a single ExplorerManager.
If the user selects a node in one OutlineView all other Views will be synchronized (selection and expand state of the nodes).
This works well in most cases. But there are also cases where this synchronization does not work correctly.

I created a small test application (see attachment tree_view_sync.zip).
This application consists of 5 OutlineViews that share the same ExplorerManager.
On the bottom of the main frame there is a JTextArea that displays all selection events that are generated by the ExplorerManager.
You can select nodes from any of the trees and the other trees will be synchronized.

But is does not work in the following case (see also attached screenshot):
- restart the application
- expand node "2" and select node "2.2" in the first tree
- text area will show the even: SELECTED_NODES: old node: []; new node: [2.2]
- now expand node "1" and select node "1.2" within the same tree
- ExplorerManager now creates a lot of selection events:
SELECTED_NODES: old node: [2.2]; new node: [1.2]
SELECTED_NODES: old node: [1.2]; new node: [2.2]
SELECTED_NODES: old node: [2.2]; new node: []
SELECTED_NODES: old node: []; new node: [2.2]
- but the synchronization between the OutlineViews is not done correctly

The synchronization seems not to work correctly if you start from the bottom of the tree and select a (still collapsed) node from above the current selection.

Can anybody reproduce this behaviour?
Am i doing something wrong or is this a bug?




Attachments: 
http://forums.netbeans.org//files/tree_view_sync_252.zip
http://forums.netbeans.org//files/multi_tree_view_115.png
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.