Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Filters in GEF
Filters in GEF [message #129247] Wed, 28 April 2004 01:24 Go to next message
Eclipse UserFriend
Originally posted by: vgusev.graphlogic.com

Hello,

What would be a roadmap to implement filters in GEF editors. For example, I
would like to use the filter dialog similar to that in the Tasks view to
filter out the nodes, children, links etcetera at will. So more precisely,
how one can hook into this kind of Filter from GEF? Thanks.

Vladimir
Re: Filters in GEF [message #129502 is a reply to message #129247] Wed, 28 April 2004 23:34 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
I am not sure what exactly you are looking for. GEF currently doesn't
support a filter mechanism. But it shouldn't be too difficult to achieve
what you want to do. You can just put a filter action on your context menu,
system menu, and/or toolbar, and then take different actions depending on
what kind of filtering is requested. For instance, if connections are to be
filtered, you could invoke setVisible(false) for the connection layer. Or
if all nodes of a certain type (say labels in the logic example) were to be
filtered, you could just refresh your editparts (assuming your
getModelChildren() method would know that it needs to filter the labels
based on some property).

"Bob" <vgusev@graphlogic.com> wrote in message
news:c6n0pd$k3e$1@eclipse.org...
> Hello,
>
> What would be a roadmap to implement filters in GEF editors. For example,
I
> would like to use the filter dialog similar to that in the Tasks view to
> filter out the nodes, children, links etcetera at will. So more precisely,
> how one can hook into this kind of Filter from GEF? Thanks.
>
> Vladimir
>
>
>
Re: Filters in GEF [message #129627 is a reply to message #129502] Thu, 29 April 2004 02:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vgusev.graphlogic.com

The Figure class has isVisible method:
public boolean isVisible() {
return getFlag(FLAG_VISIBLE);
}

FLAG_VISIBLE rings a bell as something related to filters. Hence the
question. I thought there was a standard way to set the flags in Figure from
the Filter dialog. Yes?

Vladimir



"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:c6pb6a$cf9$1@eclipse.org...
> I am not sure what exactly you are looking for. GEF currently doesn't
> support a filter mechanism. But it shouldn't be too difficult to achieve
> what you want to do. You can just put a filter action on your context
menu,
> system menu, and/or toolbar, and then take different actions depending on
> what kind of filtering is requested. For instance, if connections are to
be
> filtered, you could invoke setVisible(false) for the connection layer. Or
> if all nodes of a certain type (say labels in the logic example) were to
be
> filtered, you could just refresh your editparts (assuming your
> getModelChildren() method would know that it needs to filter the labels
> based on some property).
>
> "Bob" <vgusev@graphlogic.com> wrote in message
> news:c6n0pd$k3e$1@eclipse.org...
> > Hello,
> >
> > What would be a roadmap to implement filters in GEF editors. For
example,
> I
> > would like to use the filter dialog similar to that in the Tasks view to
> > filter out the nodes, children, links etcetera at will. So more
precisely,
> > how one can hook into this kind of Filter from GEF? Thanks.
> >
> > Vladimir
> >
> >
> >
>
>
Re: Filters in GEF [message #129772 is a reply to message #129627] Thu, 29 April 2004 15:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

figure visibility is not currently tied into whether an editpart is
selected. So your editparts would have to be careful to deselect themselves
if their filter state/figure visibility changed.

"Vladimir" <vgusev@graphlogic.com> wrote in message
news:c6ppbe$npj$1@eclipse.org...
> The Figure class has isVisible method:
> public boolean isVisible() {
> return getFlag(FLAG_VISIBLE);
> }
>
> FLAG_VISIBLE rings a bell as something related to filters. Hence the
> question. I thought there was a standard way to set the flags in Figure
from
> the Filter dialog. Yes?
>
> Vladimir
>
>
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:c6pb6a$cf9$1@eclipse.org...
> > I am not sure what exactly you are looking for. GEF currently doesn't
> > support a filter mechanism. But it shouldn't be too difficult to
achieve
> > what you want to do. You can just put a filter action on your context
> menu,
> > system menu, and/or toolbar, and then take different actions depending
on
> > what kind of filtering is requested. For instance, if connections are
to
> be
> > filtered, you could invoke setVisible(false) for the connection layer.
Or
> > if all nodes of a certain type (say labels in the logic example) were to
> be
> > filtered, you could just refresh your editparts (assuming your
> > getModelChildren() method would know that it needs to filter the labels
> > based on some property).
> >
> > "Bob" <vgusev@graphlogic.com> wrote in message
> > news:c6n0pd$k3e$1@eclipse.org...
> > > Hello,
> > >
> > > What would be a roadmap to implement filters in GEF editors. For
> example,
> > I
> > > would like to use the filter dialog similar to that in the Tasks view
to
> > > filter out the nodes, children, links etcetera at will. So more
> precisely,
> > > how one can hook into this kind of Filter from GEF? Thanks.
> > >
> > > Vladimir
> > >
> > >
> > >
> >
> >
>
>
Re: Filters in GEF [message #129784 is a reply to message #129247] Thu, 29 April 2004 15:53 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Besides figure visibility, you can also modify the way
getModelChildren/getModelSourceConnections works in your editpart
implementations. Then, all you need to do, is call refreshXxxx() when the
filter state changes. It's a simple matter of notification at that point.

"Bob" <vgusev@graphlogic.com> wrote in message
news:c6n0pd$k3e$1@eclipse.org...
> Hello,
>
> What would be a roadmap to implement filters in GEF editors. For example,
I
> would like to use the filter dialog similar to that in the Tasks view to
> filter out the nodes, children, links etcetera at will. So more precisely,
> how one can hook into this kind of Filter from GEF? Thanks.
>
> Vladimir
>
>
>
Previous Topic:Infinite Loop
Next Topic:handle to the model class
Goto Forum:
  


Current Time: Sat Nov 22 10:46:31 GMT 2014

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

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