Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » inherit Ecore.ecore in my ecore file
inherit Ecore.ecore in my ecore file [message #534143] Tue, 18 May 2010 08:31 Go to next message
jeremie is currently offline jeremieFriend
Messages: 233
Registered: April 2010
Senior Member
Hi,

I would like in a .ecore file create classes which inherit or use some EObject of the EMF meta model.
For example I would like to create a class MyEclass which inherit EClass.

Jérémie
Re: inherit Ecore.ecore in my ecore file [message #534185 is a reply to message #534143] Tue, 18 May 2010 09:59 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,
click on the menue "Sample Ecore Editor" => Load Ressource and select
the Ecore you want to use. Then you can use any element, like it was
part of you model. When you create the model later on, make sure you
uncheck the referenced model from creation and only use it as a reference.
Cheers
Jonas

jeremie wrote:
> Hi,
>
> I would like in a .ecore file create classes which inherit or use some
> EObject of the EMF meta model. For example I would like to create a
> class MyEclass which inherit EClass.
>
> Jérémie
Re: inherit Ecore.ecore in my ecore file [message #534186 is a reply to message #534143] Tue, 18 May 2010 10:12 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Hi Jérémie,

Note that is is generally recommended *not* to extend Ecore! Compare,
e.g., http://old.nabble.com/EMF-metamodel-reuse-td21827507.html

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 18.05.2010 10:31, schrieb jeremie:
> Hi,
>
> I would like in a .ecore file create classes which inherit or use some
> EObject of the EMF meta model. For example I would like to create a
> class MyEclass which inherit EClass.
>
> Jérémie


Re: inherit Ecore.ecore in my ecore file [message #534192 is a reply to message #534186] Tue, 18 May 2010 10:28 Go to previous messageGo to next message
jeremie is currently offline jeremieFriend
Messages: 233
Registered: April 2010
Senior Member
oki,

So I will try to use EMF classes with no inherit, only aggregations and compositions. hope I still will be able to do what I want with this method.
But where can I find the Ecore.ecore file to use it in my meta-model?


Jérémie

[Updated on: Tue, 18 May 2010 10:29]

Report message to a moderator

Re: inherit Ecore.ecore in my ecore file [message #534197 is a reply to message #534192] Tue, 18 May 2010 10:34 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 18.05.2010 12:28, schrieb jeremie:
> oki,
>
> SO I will try to use EMF classes with no inherit, only aggregation and
> composition. hope I still will be able to do what I want with this method
> Bit where can I find the Ecore.ecore file to use it in my meta-model?
I think it's best to import the org.eclipse.emf.ecore plugin into your
workspace and load it like Jonas eyplained.

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: inherit Ecore.ecore in my ecore file [message #534198 is a reply to message #534197] Tue, 18 May 2010 10:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Eike,

It's also fine to use Load Resource -> Browse Registered Packages and
load the Development Time version as Jonas alluded to.


Eike Stepper wrote:
> Am 18.05.2010 12:28, schrieb jeremie:
>> oki,
>>
>> SO I will try to use EMF classes with no inherit, only aggregation
>> and composition. hope I still will be able to do what I want with
>> this method
>> Bit where can I find the Ecore.ecore file to use it in my meta-model?
> I think it's best to import the org.eclipse.emf.ecore plugin into your
> workspace and load it like Jonas eyplained.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: inherit Ecore.ecore in my ecore file [message #534201 is a reply to message #534198] Tue, 18 May 2010 10:59 Go to previous message
jeremie is currently offline jeremieFriend
Messages: 233
Registered: April 2010
Senior Member
oki, really thanks,

jérémie
Previous Topic:[CDO] newbie - NPE when saving.
Next Topic:How to use templates selectively
Goto Forum:
  


Current Time: Thu Sep 19 05:14:26 GMT 2024

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

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

Back to the top