Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] Programmatically generate POJOs in a standalone project
[Texo] Programmatically generate POJOs in a standalone project [message #908786] Thu, 06 September 2012 02:05 Go to next message
Benjamin M. is currently offline Benjamin M.Friend
Messages: 13
Registered: September 2012
Junior Member
Hello everyone,

First of all I know that there are already some threads handling this topic:
http://www.eclipse.org/forums/index.php/t/351255/
and
http://www.eclipse.org/forums/index.php/t/169019/

Since they're from 2009 I'm not sure if they're up-to-date.

Following scenario:

My goal is to create a standalone project, which accepts models (ecore, XMI, whatever) and generate the (hibernate) persistence artifacts programmatically. The only problem I can see is generating the POJOs out of the eclipse IDE. Is this somehow possible? If yes, how?

I appreciate any help.

Thank you,
Benjamin
Re: [Texo] Programmatically generate POJOs in a standalone project [message #909026 is a reply to message #908786] Thu, 06 September 2012 12:35 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Benjamin,
Yes these threads are still up-to-date. So you still need eclipse running and a workspace/dev project to generate pojos
(with annotations).

I wonder, how do you see your standalone project work, how will a user use your project? It would need the emf jars and
other jars probably.

gr. Martin

On 09/06/2012 04:05 AM, Benjamin M. wrote:
> Hello everyone,
>
> First of all I know that there are already some threads handling this topic:
> http://www.eclipse.org/forums/index.php/t/351255/
> and
> http://www.eclipse.org/forums/index.php/t/169019/
>
> Since they're from 2009 I'm not sure if they're up-to-date.
>
> Following scenario:
>
> My goal is to create a standalone project, which accepts models (ecore, XMI, whatever) and generate the (hibernate)
> persistence artifacts programmatically. The only problem I can see is generating the POJOs out of the eclipse IDE. Is
> this somehow possible? If yes, how?
>
> I appreciate any help.
>
> Thank you,
> Benjamin


--

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] Programmatically generate POJOs in a standalone project [message #909331 is a reply to message #909026] Fri, 07 September 2012 00:52 Go to previous messageGo to next message
Benjamin M. is currently offline Benjamin M.Friend
Messages: 13
Registered: September 2012
Junior Member
Hello Martin,

First of all thanks for the reply. Shouldn't it be possible to do this as a RCP?

The project would have an interface to accept models and generate automatically at runtime the persistence artifacts for the given models. Actually it's supposed to be only one step of a bigger use case.

That's why I'm actually trying to merge your RCP example project together with the org.eclipse.emf.texo.modelgenerator.test project and making it run outside of eclipse.

Kind Regards,
Benjamin

[Updated on: Fri, 07 September 2012 02:59]

Report message to a moderator

Re: [Texo] Programmatically generate POJOs in a standalone project [message #909397 is a reply to message #909331] Fri, 07 September 2012 04:47 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Benjamin,
Yes that's for sure possible, with a rcp you can have a workspace and a dev project available. So indeed your approach
looks quite achievable to me.

gr. Martin

On 09/07/2012 02:52 AM, Benjamin M. wrote:
> Hello Martin,
>
> First of all thanks for the reply. Shouldn't it be possible to do this as a RCP?
>
> The standalone project would have an interface to accept models and generate automatically the persistence artifacts for
> the given models. Actually it's supposed to be only one step of a bigger use case.
>
> That's why I'm actually trying to merge your RCP example project together with the
> org.eclipse.emf.texo.modelgenerator.test project and making it run outside of eclipse.
>
> Kind Regards,
> Benjamin
>


--

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] Programmatically generate POJOs in a standalone project [message #909461 is a reply to message #909397] Fri, 07 September 2012 07:20 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Benjamin,
And as a extra remark :-), I am interested to see/follow what you are doing/trying to accomplish. So feel free to
share/update me on your results, also if I need/can test something or answer other questions let me know.

gr. Martin

On 09/07/2012 06:47 AM, Martin Taal wrote:
> Hi Benjamin,
> Yes that's for sure possible, with a rcp you can have a workspace and a dev project available. So indeed your approach
> looks quite achievable to me.
>
> gr. Martin
>
> On 09/07/2012 02:52 AM, Benjamin M. wrote:
>> Hello Martin,
>>
>> First of all thanks for the reply. Shouldn't it be possible to do this as a RCP?
>>
>> The standalone project would have an interface to accept models and generate automatically the persistence artifacts for
>> the given models. Actually it's supposed to be only one step of a bigger use case.
>>
>> That's why I'm actually trying to merge your RCP example project together with the
>> org.eclipse.emf.texo.modelgenerator.test project and making it run outside of eclipse.
>>
>> Kind Regards,
>> Benjamin
>>
>
>


--

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] Programmatically generate POJOs in a standalone project [message #909536 is a reply to message #909461] Fri, 07 September 2012 09:41 Go to previous message
Benjamin M. is currently offline Benjamin M.Friend
Messages: 13
Registered: September 2012
Junior Member
Hi Martin,

As you mentioned it should have worked that way, but actually Teneor + Hibernate Tools seems to be an (better/)easier approach here.

Your example projects helped a lot to achieve that goal. With Teneor and Hibernate it is pretty simple to create a runnable java application (outside the eclipse IDE) which reads an Ecore Model and generates persistence artifacts out of it.

Actually I prefer Texo over Teneor, but doing the same thing with Texo seems to be a bit more complicated right now. Wink


Thanks for the help!
Benjamin


Previous Topic:[EEF] Errors in the generated code.
Next Topic:SWTBot & EEF generated Forms
Goto Forum:
  


Current Time: Fri Apr 19 21:21:43 GMT 2024

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

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

Back to the top