Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » where to set up sort order for a listcompartment?
where to set up sort order for a listcompartment? [message #717255] Fri, 19 August 2011 18:02
Greg Jansen is currently offline Greg JansenFriend
Messages: 22
Registered: July 2010
Junior Member
I've got lots of compartments and mixed types of nodes within them. I'd like to sort by node type.

I've added a policy to my compartment edit part:

installEditPolicy(EditPolicyRoles.SORT_FILTER_ROLE, new ElementSortFilterCompartmentItemsEditPolicy());

I also added a getComparator() method..

However, none of these are called when I add new nodes to the compartment. I think this is b/c the style of the view is not set to sort.

ListCompartmentEditPart.getSortedChildren() is probably being called, but the style on the view model is probably something like Sorting.NONE_LITERAL. How can I create these views with a default style. Where do you do that kind of view initialization?

thanks,
Greg
Previous Topic:multiple editors for packages
Next Topic:Get EditPart from Impl
Goto Forum:
  


Current Time: Thu Mar 28 09:33:01 GMT 2024

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

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

Back to the top