Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Texo] Extend Ecore Model
[Texo] Extend Ecore Model [message #1061329] Fri, 31 May 2013 08:58 Go to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Hello,

i have two ecore models. I attach both projects which contains the models.
One base Model(texo.base) and a second extends this base Model(texo).
I have a Eclass TestA in the second model which has a EAttribute from the base Model.
I created one texo.annotationsmodel which should create the classes from both ecore files. So i have two Annotated EPackage for the base model and second model. But the classes from the base model aren't generated.

So how can I use the extending Model mechanism from EMF in Texo? Or do i need seperate annotationsmodel for every ecore model?

Thanks

  • Attachment: texo.base.zip
    (Size: 14.99KB, Downloaded 146 times)
  • Attachment: texo.zip
    (Size: 6.30KB, Downloaded 139 times)
Re: [Texo] Extend Ecore Model [message #1061407 is a reply to message #1061329] Fri, 31 May 2013 13:48 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Sir,
Have you selected both ecore files when generating code?

Normally it is better to have separate annotations model files for separate ecore files.

gr. Martin

On 05/31/2013 10:58 AM, Sir Wayne wrote:
> Hello,
>
> i have two ecore models. I attach both projects which contains the models.
> One base Model(texo.base) and a second extends this base Model(texo).
> I have a Eclass TestA in the second model which has a EAttribute from the base Model.
> I created one texo.annotationsmodel which should create the classes from both ecore files. So i have two Annotated EPackage for the base model and second model. But the classes from the base model aren't generated.
>
> So how can I use the extending Model mechanism from EMF in Texo? Or do i need seperate annotationsmodel for every ecore model?
>
> Thanks
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] Extend Ecore Model [message #1061420 is a reply to message #1061407] Fri, 31 May 2013 14:26 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Martin Taal wrote on Fri, 31 May 2013 09:48
Hi Sir,
Have you selected both ecore files when generating code?


Doesn't work. The Generator ignore the properties from the extending ecore file

Martin Taal wrote on Fri, 31 May 2013 09:48
Hi Sir,
Normally it is better to have separate annotations model files for separate ecore files.


With this suggestion i have two problems.
1. I want to generate all separate texo models in a own project (osgi-bundle) in the same package. If i generate model one it works, but model 2 will delete all generated files from model one. So i need separate packages or different gen-folder for every texo model Sad.

2. The EAttribute and EReference from the extending model are wrong, if you change the simple class name. Same problem as http://www.eclipse.org/forums/index.php/t/488058/, but more complex because now we have to different ecore and texo files files.

[Updated on: Fri, 31 May 2013 14:26]

Report message to a moderator

Re: [Texo] Extend Ecore Model [message #1061441 is a reply to message #1061420] Fri, 31 May 2013 15:52 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Sir,
Okay, for the first problem, can you create a bugzilla and upload the projects/files?

For the second problem, yes that's the way it works currently, it assumes that each epackage is stored in its own
folder. But if you have the texo model each in their own project then you generate into different src folders, at least
that's how it standard is with me.

For problem 2, I have several examples in the Texo testsuite where ecore models are related/extend eachother, and it
works fine for me.

gr. Martin

On 05/31/2013 04:26 PM, Sir Wayne wrote:
> Martin Taal wrote on Fri, 31 May 2013 09:48
>> Hi Sir,
>> Have you selected both ecore files when generating code?
>
>
> Doesn't work. The Generator ignore the properties from the extending ecore file
>
> Martin Taal wrote on Fri, 31 May 2013 09:48
>> Hi Sir,
>> Normally it is better to have separate annotations model files for separate ecore files.
>
>
> With this suggestion i have two problems. 1. I want to generate all separate texo models in a own project (osgi-bundle)
> in the same package. If i generate model one it works, but model 2 will delete all generated files from model 1. So i
> need separate packages or different gen-folder for every texo model :(.
>
> 2. The EAttribute and EReference from the extending model are wrong, if you change the simple class name. Same problem
> as http://www.eclipse.org/forums/index.php/t/488058/, but more complex because now we have to different ecore and texo
> files files.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:[Texo] EMF and Texo uses different mechanism to find ecore files
Next Topic:Using an EMF Resource without persisting it
Goto Forum:
  


Current Time: Wed Apr 24 18:52:02 GMT 2024

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

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

Back to the top