Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » seeking advice: making generated contentproviders filterable
seeking advice: making generated contentproviders filterable [message #420380] Fri, 27 June 2008 02:18 Go to next message
Jim Steel is currently offline Jim SteelFriend
Messages: 54
Registered: July 2009
Member
Hi,

I have a situation where I would like to make my generated model's
contentproviders filterable. The reason for this is that I want to be
able to apply filters in my editor and have the values displayed in the
tree/table editor vary based on the selection that results (e.g. if
calculating a cost value based on child elements, then the cost value
should change if some children are filtered out).

I figured the way to do this might be to add some code into my generated
itemproviders to support the addition of IFilters (in the way JFace's
viewers do), which can filter the itemprovider children in order to
facilitate calculating values based on filtered contents.

Has anyone done anything similar to this, got hints? Am I barking up
entirely the wrong tree?


Jim.
Re: seeking advice: making generated contentproviders filterable [message #420386 is a reply to message #420380] Fri, 27 June 2008 12:00 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Jim,

Comments below.

Jim Steel wrote:
>
> Hi,
>
> I have a situation where I would like to make my generated model's
> contentproviders filterable. The reason for this is that I want to be
> able to apply filters in my editor and have the values displayed in
> the tree/table editor vary based on the selection that results (e.g.
> if calculating a cost value based on child elements, then the cost
> value should change if some children are filtered out).
The Ecore editor provides a filter to hide generics...
>
> I figured the way to do this might be to add some code into my
> generated itemproviders to support the addition of IFilters (in the
> way JFace's viewers do), which can filter the itemprovider children in
> order to facilitate calculating values based on filtered contents.
That's another way...
>
> Has anyone done anything similar to this, got hints? Am I barking up
> entirely the wrong tree?
Have a look at how how EcoreActionBarContributor.showGenericsAction works.
>
>
> Jim.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[EMF Query] recursive conditions
Next Topic:How do I bring editor or view on an existing model instance?
Goto Forum:
  


Current Time: Thu Apr 25 19:02:25 GMT 2024

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

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

Back to the top