Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » metamodel from an external metamodel
metamodel from an external metamodel [message #417110] Wed, 27 February 2008 10:20 Go to next message
Eclipse UserFriend
Originally posted by: frederic.barraille.atosorigin.com

Hi,

I have a metamodel M1 come from an external metamodel M2.
In M2 I have two classes M2C1 and M2C2. M2C1 contains 1...* M2C2.

In M1 I have two classes M1C3 and M1C4. MIC3 inherits from M2C2 and M1C4
contains 1...* M2C1 .

I don't want to implement the M2 metamodel because it's already
implemented in another bundle. When I create my genmodel on my M1.ecore,
M2 is defined as "Referenced generator models".
I generate the code from my genmodel.

When I create a new model with a M1C4 element as root element. M1C4
contains a child element M2C1. From the M2C1 element, I can create a M2C2
element but I can't create a M1C3 element which inherits M2C2 element.

Why ? How can I defined my genmodel to have the possibility to create the
M1C3 element from M2C1?

I hope I have been clear enough,

Best Regards,

Frédéric Barraillé
Re: metamodel from an external metamodel [message #417122 is a reply to message #417110] Wed, 27 February 2008 13:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Frédéric,

Comments below.


Frédéric Barraillé wrote:
> Hi,
>
> I have a metamodel M1 come from an external metamodel M2.
I'm not sure what "come from" implies nor the significance of
"external". (I figured out later this means you inherit from its
classes and I think that M2 is not in the workspace.)
> In M2 I have two classes M2C1 and M2C2. M2C1 contains 1...* M2C2.
It's good to be explicit about the name of this containment references.
>
> In M1 I have two classes M1C3 and M1C4. MIC3 inherits from M2C2 and
> M1C4 contains 1...* M2C1 .
>
> I don't want to implement the M2 metamodel because it's already
> implemented in another bundle. When I create my genmodel on my
> M1.ecore, M2 is defined as "Referenced generator models".
> I generate the code from my genmodel.
> When I create a new model with a M1C4 element as root element. M1C4
> contains a child element M2C1. From the M2C1 element, I can create a
> M2C2 element but I can't create a M1C3 element which inherits M2C2
> element.
> Why ? How can I defined my genmodel to have the possibility to create
> the M1C3 element from M2C1?
This sounds like the topic of my recent blog:
http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html

If you get a build with that enhancement you can follow the
instructions. I.e., M2 will need to be regenerated to support
extensibility.
> I hope I have been clear enough,
> Best Regards,
> Frédéric Barraillé
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: metamodel from an external metamodel [message #417135 is a reply to message #417122] Wed, 27 February 2008 14:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: frederic.barraille.atosorigin.com

Thanks for your answer, it's corresponded to my problem.

My parent metamodel is UML, do you now if the UML code will generate with
the "Extensible Provider Factory" property sets to true in a futur version
?

Regards,

Frédéric
Re: metamodel from an external metamodel [message #417137 is a reply to message #417135] Wed, 27 February 2008 14:06 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Frédéric,

I know for a fact that UML has already been regenerated to be
extensible. Note that M5 has a bug in the child provider extenders
generation. :-( It's fixed in the latest integration build though.
The problem is that the plugin.xml registration for extenders is
generated only if you set child creation extenders to false, but of
course the class being registered is generated only if you set it to
true. So if you set to to false when generating the plugin.xml and
then change it to true to generate the class (the plugin.xml isn't
regenerated once it exists), then you'll be fine.


Frédéric Barraillé wrote:
> Thanks for your answer, it's corresponded to my problem.
>
> My parent metamodel is UML, do you now if the UML code will generate
> with the "Extensible Provider Factory" property sets to true in a
> futur version ?
>
> Regards,
>
> Frédéric
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:CompoundCommand containing multiple RecordingCommands does not undo correctly
Next Topic:EclipseCon - BoF - UI Component Programming Best Practices (SWT, Nebula, JFace, Databinding ...)
Goto Forum:
  


Current Time: Fri Apr 26 06:42:21 GMT 2024

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

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

Back to the top