Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » sorting an Outline view
sorting an Outline view [message #153583] Mon, 11 October 2004 13:12 Go to next message
Eclipse UserFriend
Originally posted by: lstrzeszynski.wp.pl

Hello!
In my current plugin I use
class OutlinePage extends ContentOutlinePage implements IAdaptable
as a outline class, where
ContentOutlinePage is
org.eclipse.ui.views.contentoutline.IContentOutlinePage
class. (it is a gef class)

The problem is I don't know how to sort the outline view using one of the
properties of the model objects.

ContentOutlinePage doen't provide any method to set the sorter,
is it possible to do using this class or other way?

Thanks in advance
Lukas
Re: sorting an Outline view [message #153592 is a reply to message #153583] Mon, 11 October 2004 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You can use EditPartViewer#setProperty() to enable sorting of a particular
kind. Then, your page needs to create an Aciton with the TOGGLE stlye and
put it on the page site's local toolbar.

You can have a single property listener for the viewer which tells all of
the treeeditparts to refresh their children.

"destrzeslu" <lstrzeszynski@wp.pl> wrote in message
news:cke0r9$ddd$1@eclipse.org...
> Hello!
> In my current plugin I use
> class OutlinePage extends ContentOutlinePage implements IAdaptable
> as a outline class, where
> ContentOutlinePage is
> org.eclipse.ui.views.contentoutline.IContentOutlinePage
> class. (it is a gef class)
>
> The problem is I don't know how to sort the outline view using one of the
> properties of the model objects.
>
> ContentOutlinePage doen't provide any method to set the sorter,
> is it possible to do using this class or other way?
>
> Thanks in advance
> Lukas
>
Re: sorting an Outline view [message #153715 is a reply to message #153592] Tue, 12 October 2004 06:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: lstrzeszynski.wp.pl

Thanks for an advice.
What more I need is how to sort the elements in EditPartViewer object.
Elements are filled in using EditPartFactory object when
setContents(Object contents)
method is invoked, but I don't know how to get them and sort in an
appropriate order.

Thanks in advance
Best Regards
Lukas

Randy Hudson wrote:

> You can use EditPartViewer#setProperty() to enable sorting of a particular
> kind. Then, your page needs to create an Aciton with the TOGGLE stlye and
> put it on the page site's local toolbar.

> You can have a single property listener for the viewer which tells all of
> the treeeditparts to refresh their children.

> "destrzeslu" <lstrzeszynski@wp.pl> wrote in message
> news:cke0r9$ddd$1@eclipse.org...
> > Hello!
> > In my current plugin I use
> > class OutlinePage extends ContentOutlinePage implements IAdaptable
> > as a outline class, where
> > ContentOutlinePage is
> > org.eclipse.ui.views.contentoutline.IContentOutlinePage
> > class. (it is a gef class)
> >
> > The problem is I don't know how to sort the outline view using one of the
> > properties of the model objects.
> >
> > ContentOutlinePage doen't provide any method to set the sorter,
> > is it possible to do using this class or other way?
> >
> > Thanks in advance
> > Lukas
> >
Re: sorting an Outline view [message #153754 is a reply to message #153715] Tue, 12 October 2004 15:26 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

getModelChildren() needs to return the model children in the sorted order
you want.
"destrzeslu" <lstrzeszynski@wp.pl> wrote in message
news:ckfsrf$m6o$1@eclipse.org...
> Thanks for an advice.
> What more I need is how to sort the elements in EditPartViewer object.
> Elements are filled in using EditPartFactory object when
> setContents(Object contents)
> method is invoked, but I don't know how to get them and sort in an
> appropriate order.
>
> Thanks in advance
> Best Regards
> Lukas
Previous Topic:Extension of FanRouter to reroute inverse connections
Next Topic:How to move an EditPart
Goto Forum:
  


Current Time: Tue Jan 21 20:01:36 GMT 2025

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

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

Back to the top