|
|
|
Re: [Newbie] Filtering selection choices on references? [message #549112 is a reply to message #549096] |
Sat, 24 July 2010 16:04 |
Ed Merks Messages: 33158 Registered: July 2009 |
Senior Member |
|
|
Andreas,
The point is to notice how it creates an inner class that extends
ItemPropertyDescriptor and then overrides the getChoiceOfValues method.
You'll do that in your own item provider for the property in question.
Andreas Goetz wrote:
> Not quite sure yet:
>
> On 23.07.2010 17:34, Ed Merks wrote:
>> Andreas,
>>
>> Comments below.
>>
>> Andreas Goetz wrote:
>>> Hi there,
>>> ...
>>> Is there a filtering extension point or similiar that would allow to
>>> do this instead of after-the-fact validation? Or some overiding of
>>> "getValidAttibuteChoices" choices in the generated model/ edit code?
>> You'd specialize the property descriptor's getChoiceOfValues to include
>> only the choices you want. See
>> ETypedElementItemProvider.addETypePropertyDescriptor.
> The generated model classes (all extending a common root model
> element) are created by EMF to extend ItemProviderAdapter. I'm lost at
> where to get the ETypedElementItemProvider from?
>>> Best regards,
>>> Andreas
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04690 seconds