Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TreeViewer Databinding issues
TreeViewer Databinding issues [message #1003555] Mon, 21 January 2013 14:08
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2594
Registered: July 2012
Senior Member

I'm working on Composite that allows modifications in a TreeViewer using databinding.
As I learned from this post I need to use an IElementComparer with databinding to avoid some issues on modification. This solved a for me still mysterious issue if I initialized the TreeViewer with an empty WritableList, changing it later on with a filled one. I really digged deep into the observable code, but still I don't understand this. But this works now.

Now I want to show the TreeViewer sorted using a ViewerComparator, but then something goes wrong. If I remove an element from the top level WritableList, it is removed out of the list, but the TreeViewer still shows it. This is only true if I set the DefaultElementComparer as described in the post is linked before. Removing the DefaultComparer, everything works fine, expect that mysterious bug I described before.

I should mention that all of my objects showed in the tree are implementing equals() and hashCode() properly.

I'm testing and debugging this for several days now, but I don't have a clue what the issue could be. I really need some help.

Thanks in advance for any help
Previous Topic:Compositeruler and Sourceviewerconfiguration
Next Topic:ComboBox selection change listener issue
Goto Forum:

Current Time: Thu May 24 12:24:43 GMT 2018

Powered by FUDForum. Page generated in 0.01592 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top