Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » (no subject)
(no subject) [message #727101] Tue, 20 September 2011 11:52
igor is currently offline igorFriend
Messages: 1
Registered: July 2009
Junior Member
Hi everybody.
I'm working on control which uses TreeViewer and I need this viewer to be sortable. But when I set sorter or comparator to this viewer some nodes become collapsed. There is a workaround which can be used:
Object [] expanded = treeViewer.getExpandedElements();
treeViewer.setComparator(treeComparator);
treeViewer.setExpandedElements(expanded);


This behavior is reproducible with Helios and Indigo.
Even JDT has the same behavior.
Try to create class with next content

public class Test {

class T2 {

class T {

public void t2() {

}
public void t1() {

}
}
}

class T1 {

}


}

open outline view, expand all nodes, and press sort button. T node will be collapsed.

Can somebody explain why changing of sorter collapses some nodes?
Previous Topic:TreeViewer collapses nodes after sorter is set.
Next Topic:StyledCellLabelProvider right aligned text
Goto Forum:
  


Current Time: Thu Apr 25 01:04:32 GMT 2024

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

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

Back to the top