Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Adding folders in outline view
Adding folders in outline view [message #238269] Tue, 04 September 2007 03:19 Go to next message
Eclipse UserFriend
Originally posted by: pilgrim.us.ibm.com

I would like to add some organization to the outline view to make it
easier to use in my application. In terms of the logic example, I want to
introduce folders based on properties of elements or on their classes. I
could have 3 folders of gates with 0, 1, or 2 inputs. I could also have a
folder for all or-gates and a folder for all and-gates.

Since the outline view is built from the root diagram's children, one way
would be to introduce that hierarchy. But that affects the graphical view
also and I'm hoping to not have to do that. Any suggestions on what would
be the best way to proceed?

Thanks,
Jeff
Re: Adding folders in outline view [message #238304 is a reply to message #238269] Tue, 04 September 2007 20:24 Go to previous message
Eclipse UserFriend
Originally posted by: pilgrim.us.ibm.com

thanks to Randy for this tip offline:

<i>
Jeff,

You can easily have editparts that don't map 1-to-1 with you model hierarchy. It would look something like this:

in the editpart with categories as children:

getModelChildren() {
...
result.add( new CategoryWrapper(getModel(), CATEGORY_1);
result.add(new CategoryWrapper(getModel(), CATEGORY_2);
return result;
}

Category editparts then get created for these spoofed model children. It's often best to unwrap these spoofs and get the real model object rather than trying to implement to new virtual model object with its own notification, etc.

Then, in one of the category editparts:

getModelChildren() {

//Get the model, which is probably the same as the parent's model at this point
//Get the features related to the category indicated in the wrapper/spoof
}

-Randy
</i>
Previous Topic:Panning with an icon click
Next Topic:Scroll bar Problem-draw2d
Goto Forum:
  


Current Time: Tue Apr 23 14:30:36 GMT 2024

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

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

Back to the top