Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » limitation of child extender ?
limitation of child extender ? [message #1806733] Tue, 14 May 2019 13:28 Go to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 249
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello everybody,
I'm working with several metamodels and I don't get all possible new children in one usecase...

I have an Ecore metamodel A, with a element ElementA, which owns element called SubElementA.
I generated the model, edit and editor plugins

I have a 2nd Ecore metamodel B, with an element SubElementB which extends SubElementA.
I generated only model and edit plugins

I have a 3rd Ecore metamodel C, with an element ElementC which extends ElementA.
I generated only model and edit plugins.

Child Creation Extender is set to true in each genmodel.

I'm not able to create SubElementB as child of ElementC in the editor generated for the A model.

Is it the expected behavior or I forgot to do something ?

Regards,

Re: limitation of child extender ? [message #1806735 is a reply to message #1806733] Tue, 14 May 2019 13:31 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Vincent.

The child creation extension is a two-way street. The Edit providers for the model that wants to find child creation extenders also needs to set the "Extensible Provider Factory" property in the GenModel. Otherwise, generated extenders will have no effect because the Edit providers won't look for them.

HTH,

Christian
Re: limitation of child extender ? [message #1806807 is a reply to message #1806735] Wed, 15 May 2019 11:39 Go to previous messageGo to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 249
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi Christian,
this property is already set to true in all my genmodel... In attachment, a simple model to reproduce easily my usecase, with a snapshot of the result.

I'm not able to create a ClassC as children of ClassBExtendingAA (please see snapshot for a better understanding)

index.php/fa/35577/0/

[Updated on: Wed, 15 May 2019 11:39]

Report message to a moderator

Re: limitation of child extender ? [message #1806811 is a reply to message #1806807] Wed, 15 May 2019 13:57 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Another not nice limitation is that the GenModel must know about the other GenModels whose models' child creations it should extend. So if C's GenModel does see B's GenModel (it is not among the usedGenPackages of C), it will not know to create extensions for B.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=274884


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:IllegalValueException in web.xml with variable
Next Topic:retain order of XML elements when using EMF
Goto Forum:
  


Current Time: Fri Apr 26 00:17:28 GMT 2024

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

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

Back to the top