Ecore model root element [message #419605] |
Wed, 28 May 2008 15:25 |
Eclipse User |
|
|
|
Originally posted by: rivera.lcc.uma.es
Hi all,
Sorry for that simple question, but is it mandatory to have a root
package in a Ecore model (representing a metamodel)?
I have seen many examples on which several EPackages are defined, but
they are always contained in a root EPackage. ¿Is that a constraint?
I have not found information stating that (nor revoking it).
Having a look at the Ecore metamodel, there is no element to represent
the metamodel itself, so if there is no need to have an unique root
EPackage, do I have to assume that the name of the metamodel is the name
of the file (or variable) where it is contained?
Thank you in advance,
Jose E. Rivera
|
|
|
Re: Ecore model root element [message #419608 is a reply to message #419605] |
Wed, 28 May 2008 15:50 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Jose,
Comments below.
Jose E. Rivera wrote:
> Hi all,
>
> Sorry for that simple question, but is it mandatory to have a root
> package in a Ecore model (representing a metamodel)?
Yes there must be an EPackage to contain your EClassifiers.
> I have seen many examples on which several EPackages are defined, but
> they are always contained in a root EPackage. ¿Is that a constraint?
> I have not found information stating that (nor revoking it).
I suppose it's possible to have multiple EPackage in a single file, but
I could imagine there'd be places in the framework that will like to
assume there's only one.
>
> Having a look at the Ecore metamodel, there is no element to represent
> the metamodel itself,
I'm not sure what this comment means.
> so if there is no need to have an unique root EPackage, do I have to
> assume that the name of the metamodel is the name of the file (or
> variable) where it is contained?
I'm not sure what you mean by "the metamodel". Definitely EPackage is
the root of all the other things and and EClassifiers without a
containing EPackage don't have a complete meaning, i.e., there's no way
to navigator to a factory for working with them...
>
> Thank you in advance,
> Jose E. Rivera
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03637 seconds