|
|
|
Re: Filtering Attributes [message #1404884 is a reply to message #1404793] |
Wed, 06 August 2014 04:34 |
Ed Merks Messages: 33133 Registered: July 2009 |
Senior Member |
|
|
Al,
Comments below.
On 05/08/2014 9:31 PM, Al B wrote:
> Hi Ed,
>
> No, we are not using GMF. Let's say I am extending to type of EMF
> editors (forget about the pallet) and I want to filter attributes on
> the properties view based on the type of editor they EMF elements are
> being instantiated, can I used EMF annotations to accomplish that or
> or will it be better to split the links into two different types (e.g.
> PatternLink -> Link and ArgumentLink -> Link)?
No, you can't control that with annotations. Which properties are
displayed can be control from the GenFeature, i.e., you can set Property
Type to None. But that's an all or nothing decision for that type of
object. In the end, the item providers themselves determine which
properties are displayed, so you could specialize
LinkItemProvider.getPropertyDescriptors such that whether or not it
returns those properties or not is conditional. You might make the
condition use some interface implemented by the adapterFactory (visible
as a protected member) to determine whether to return those property
descriptors, and then in one context (likely by default) you can show
them, and in another, you create a derived factory that specified you
don't want those extra properties, and use that factory instead when you
don't want them.
>
> TIA
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02093 seconds