Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Filtering Attributes
Filtering Attributes [message #1404787] Tue, 05 August 2014 18:43 Go to next message
Al B is currently offline Al BFriend
Messages: 47
Registered: June 2012
Member
Our current model contains bound attributes at the abstract class level (see attached diagram) and the concrete classes are displaying on the pallet so user can create instances by dropping them onto a diagram editor. Our tool has 2 type of diagrams editors (pattern diagram and argument diagram). However, we would like the bounds properties only to be displayed on the pattern diagrams. Besides that, the links behavior/meaning is exactly the same.

So, can I use EMF annotations to filter them out or will it be better split the links into two different types (e.g. PatternLink -> Link and ArgumentLink -> Link)
  • Attachment: Links.png
    (Size: 34.24KB, Downloaded 152 times)
Re: Filtering Attributes [message #1404792 is a reply to message #1404787] Tue, 05 August 2014 19:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Al,

Comments below.

On 05/08/2014 8:43 PM, Al B wrote:
> Our current model contains bound attributes at the abstract class level (see attached diagram) and the concrete classes are displaying on the pallet so user can create instances by dropping them onto a diagram editor. Our tool has 2 type of diagrams editors (pattern diagram and argument diagram). However, we would like the bounds properties only to be displayed on the pattern diagrams.
Is this a GMF question? If so, it's likely better to ask on the GMF
newsgroup...
> Besides that, the links behavior/meaning is exactly the same.
>
> So, can I use EMF annotations to filter them out or will it be better split the links into two different types (e.g. PatternLink -> Link and ArgumentLink -> Link)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Filtering Attributes [message #1404793 is a reply to message #1404792] Tue, 05 August 2014 19:31 Go to previous messageGo to next message
Al B is currently offline Al BFriend
Messages: 47
Registered: June 2012
Member
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)?

TIA
Re: Filtering Attributes [message #1404884 is a reply to message #1404793] Wed, 06 August 2014 04:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
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/
Re: Filtering Attributes [message #1405189 is a reply to message #1404884] Wed, 06 August 2014 20:03 Go to previous message
Al B is currently offline Al BFriend
Messages: 47
Registered: June 2012
Member
Thanks Ed. You put me in the right track. Cheers!
Previous Topic:Array of references in model
Next Topic:Refresh View Programmatically
Goto Forum:
  


Current Time: Thu Apr 18 07:38:53 GMT 2024

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

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

Back to the top