Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Children ItemProvider in parent
Children ItemProvider in parent [message #507224] Tue, 12 January 2010 14:50 Go to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Hi,

I have a Parent class that looks like this (simplified):

class Parent {
name: String;
children[0..1]: Children; <- containament ref.
}

class Children {
name:String;
multiplicity:Int;
}

I generated GMF editor for this ecore model. I want to enable when user click on the Parent in the diagram, that he can change its Children multiplicity property, if Children exists for the Parent. So, I need to show Children multiplicity property in the Parent property sheet. How can I do this? Is it possible to include Children ItemPropertyDescriptors in the Parent ItemPropertyDescriptors ?

--
thx, Milan
Re: Children ItemProvider in parent [message #507245 is a reply to message #507224] Tue, 12 January 2010 15:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Milan,

Have a look at how TreeNodeItemProvider uses
ItemPropertyDescriptorDecorator to do something similar.


Milan Milanovich wrote:
> Hi,
>
> I have a Parent class that looks like this (simplified):
>
> class Parent {
> name: String;
> children[0..1]: Children; <- containament ref.
> }
>
> class Children {
> name:String;
> multiplicity:Int;
> }
>
> I generated GMF editor for this ecore model. I want to enable when
> user click on the Parent in the diagram, that he can change its
> Children multiplicity property, if Children exists for the Parent. So,
> I need to show Children multiplicity property in the Parent property
> sheet. How can I do this? Is it possible to include Children
> ItemPropertyDescriptors in the Parent ItemPropertyDescriptors ?
>
> --
> thx, Milan


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Children ItemProvider in parent [message #507282 is a reply to message #507245] Tue, 12 January 2010 18:11 Go to previous message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Mr. Merks,

thank you. It works!

--
Best regards, Milan
Previous Topic:EMF test code
Next Topic:Re: CDO exception
Goto Forum:
  


Current Time: Thu Apr 25 07:14:02 GMT 2024

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

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

Back to the top