Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Nested Properties in EMF
Nested Properties in EMF [message #1008169] Mon, 11 February 2013 09:06 Go to next message
Stacey Hopkins is currently offline Stacey HopkinsFriend
Messages: 34
Registered: March 2012
Member
Have an EMF RCP app that allows the user to create their own global properties (meta-type). Want the view behaviour to break the default behaviour of being shown in the treeview and shown in the properties view. There is a similar-ish case where we have done this (using the good EMF book) but this is when there was just a one to one containment relationship between the two EClasses. This new behaviour we want to allow the user to define many global properties and for these to be catgegorized as a global property.

The attached pic is an example (although not exact) of the view we would like to do.

Are current thinking is that we would have to create our own custom properties view. If this is correct is this a big undertaking? Any tips on things that should considered when doing this?

Any help appreciated
  • Attachment: a.jpg
    (Size: 63.13KB, Downloaded 60 times)
Re: Nested Properties in EMF [message #1008290 is a reply to message #1008169] Mon, 11 February 2013 19:15 Go to previous messageGo to next message
Stacey Hopkins is currently offline Stacey HopkinsFriend
Messages: 34
Registered: March 2012
Member
To explain the attachement better...."Table" would be Global Property and then ignore the other lines apart from "Background" and "Box" which would be an example of a user defined global property..... The EAttribute for each global property is the same for each GlobalProperty
Re: Nested Properties in EMF [message #1008291 is a reply to message #1008290] Mon, 11 February 2013 19:16 Go to previous messageGo to next message
Stacey Hopkins is currently offline Stacey HopkinsFriend
Messages: 34
Registered: March 2012
Member
and a snippet of the ecore model....any help appreciated!
  • Attachment: ab.jpg
    (Size: 8.40KB, Downloaded 62 times)

[Updated on: Mon, 11 February 2013 19:16]

Report message to a moderator

Re: Nested Properties in EMF [message #1008345 is a reply to message #1008169] Tue, 12 February 2013 05:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 26289
Registered: July 2009
Senior Member
If I understand correctly from your last diagram, it's a matter of
ensuring that getPropertyDescriptor for your ModelItemProvider returns
the set of all properties you want at the top level in the properties
view. I'd suggest having a look at
org.eclipse.emf.edit.tree.provider.TreeNodeItemProvider.getPropertyDescriptors(Object).
In this case it's showing how to merge the property descriptors provided
by the object referenced by a tree node as if they are properties of the
tree node itself. That type of approach should work for your example.



On 11/02/2013 10:06 AM, Stacey Hopkins wrote:
> Have an EMF RCP app that allows the user to create their own global properties (meta-type). Want the view behaviour to break the default behaviour of being shown in the treeview and shown in the properties view. There is a similar-ish case where we have done this (using the good EMF book) but this is when there was just a one to one containment relationship between the two EClasses. This new behaviour we want to allow the user to define many global properties and for these to be catgegorized as a global property.
>
> The attached pic is an example (although not exact) of the view we would like to do.
>
> Are current thinking is that we would have to create our own custom properties view. If this is correct is this a big undertaking? Any tips on things that should considered when doing this?
>
> Any help appreciated
Previous Topic:Xcore - single container, multiple opposite
Next Topic:[CDO/Hibernate] ObjectNotFoundException No row with the given identifier exists
Goto Forum:
  


Current Time: Mon Dec 22 09:55:23 GMT 2014

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

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