Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » "Filter" elements with reference to interface(EMF, Ecore)
"Filter" elements with reference to interface [message #1720282] Fri, 15 January 2016 21:25 Go to next message
Morten MacFly is currently offline Morten MacFlyFriend
Messages: 69
Registered: July 2009
Member
Dear all,

in my EMF model I have "somewhere" a list to objects that share the same interface. This works just fine except in one place where due to the business logic it makes no sense to present all items.

Where would I (at best) filter the list I present to the user? The list is the "standard" one that allows to select items from the left and add them to the right side probably using a "name" filter on the left side. I would need an "object" filter based on an attribute of the container of this object as shown schematically:

ContainerObject -> Attribute XXX
|->ChildObject
|-> Attribute 1
|-> Attribute 2 (...)
|-> Attribute YYY = List of objects that share the same interface

If Attribute XXX is set to a certain value, the list shall be limited, but _before_ it is presented to the user.

I would be thankful for any help...

With best regards, Morten.

PS: Eclipse Mars, if that is of importance.
Re: "Filter" elements with reference to interface [message #1720283 is a reply to message #1720282] Fri, 15 January 2016 21:45 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
On 15-Jan-16 22:25, Morten MacFly wrote:

> If Attribute XXX is set to a certain value, the list shall be limited,
> but _before_ it is presented to the user.

You can do this in the generated ItemProvider for the EClass that holds
the yyy reference. Look at that ItemProviders getPropertyDescriptors()
method and customize the getChoiceOfValues() or getComboBoxObjects()
methods on the corresponding yyy property descriptor.

Felix
Previous Topic:[CDO] resource.delete() fails for HibernateStore with Nullability-Exception
Next Topic:[Xcore] customize save
Goto Forum:
  


Current Time: Sat Apr 27 02:32:38 GMT 2024

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

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

Back to the top