Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to create automatically children nodes
How to create automatically children nodes [message #235517] Tue, 07 July 2009 12:33 Go to next message
Daniel is currently offline DanielFriend
Messages: 19
Registered: July 2009
Junior Member
Hello,

My model contains an object A, with a reference to an object B and an
object C.
I would like to create a new object B and new object C automatically with
references when I only click on the creation tool object A.

Is it possible? Should I look on emf, to see if it is possible to create
children automatically?

Thanks
Re: How to create automatically children nodes [message #235531 is a reply to message #235517] Tue, 07 July 2009 12:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Daniel a écrit :
> Hello,
>
> My model contains an object A, with a reference to an object B and an
> object C.
> I would like to create a new object B and new object C automatically
> with references when I only click on the creation tool object A.
>
> Is it possible? Should I look on emf, to see if it is possible to create
> children automatically?
>
> Thanks
>

Hi Daniel,

It is possible.

Use Feature seq initializer in your gmf map under the node mapping
Re: How to create automatically children nodes [message #235538 is a reply to message #235531] Tue, 07 July 2009 13:16 Go to previous messageGo to next message
Daniel is currently offline DanielFriend
Messages: 19
Registered: July 2009
Junior Member
It looks magic, thanks for your help, but I still have a problem: children
objects automatically created don't appear on the diagram.

Moreover, I still don't understand the error

'feature' of 'ReferenceNewElementSpec' must refer to containment
ecore::EReference

thanks for your help
Re: How to create automatically children nodes [message #235545 is a reply to message #235538] Tue, 07 July 2009 13:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Daniel a écrit :
> It looks magic, thanks for your help, but I still have a problem:
> children objects automatically created don't appear on the diagram.
>
> Moreover, I still don't understand the error
>
> 'feature' of 'ReferenceNewElementSpec' must refer to containment
> ecore::EReference
>
> thanks for your help
>


don't know exactly but i think that element miss :
try to have this kind of strucure :

Feature seq initializer
- Reference New element spec
- Feature sew initializer
- Feature value spec
- Value Expression

and fill for each level the feature properties
Re: How to create automatically children nodes [message #235565 is a reply to message #235545] Tue, 07 July 2009 13:41 Go to previous message
Daniel is currently offline DanielFriend
Messages: 19
Registered: July 2009
Junior Member
I tried that structure but I still have an error, but I can compile and
run anyway.

Do you know how can I access this hidden object automatically created to
modify its properties, and is it possible to link this new hidden object
to another one using is parent?

I mean, let's see this structure
Object A creates object B and object C automatically

Object A' creates object B' and object C' automatically

I need to link object B and object B' using object A and object A'.


Thanks a lot
Previous Topic:Lock appearance options
Next Topic:How to exclude xxx_diagram file
Goto Forum:
  


Current Time: Fri Mar 29 07:59:12 GMT 2024

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

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

Back to the top