Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore model root element
Ecore model root element [message #419605] Wed, 28 May 2008 15:25 Go to next message
Eclipse UserFriend
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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:[Databinding] Problem with MasterDetail and EObjectObservableMap
Next Topic:EReference into resource of different file type
Goto Forum:
  


Current Time: Fri Apr 26 00:43:02 GMT 2024

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

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

Back to the top