Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TEXO][Xcore] Generating JPA Entities from Xcore
[TEXO][Xcore] Generating JPA Entities from Xcore [message #1220353] Wed, 11 December 2013 09:21 Go to next message
Dominik Leszyk is currently offline Dominik LeszykFriend
Messages: 22
Registered: December 2013
Junior Member
Hi All,

I'm trying to use Xcore together with Texo. After creating Xcore file I've created accompanying ecore file (using EMF Generator Model) as described on Xcore page. From such generated ecore file I try to invoke Texo (i.e. Texo / Generate Model + DAO Code) but then I got error:

Diagnosis of platform:/resource/org.ngo.help.sample.model/model/model.ecore#/
The feature 'eType' of 'platform:/resource/org.ngo.help.sample.model/model/model.ecore#//Library/name' contains an unresolved proxy 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'
The feature 'eAttributeType' of 'platform:/resource/org.ngo.help.sample.model/model/model.ecore#//Library/name' contains an unresolved proxy 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'


After looking into generated ecore file I see that there are local references to the file system:

<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>


And when looking into examples of ecore files provided with Texo, it looks quite different, e.g.:

<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
    eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">


I manualy edited ecore file to use these global addresses instead of the local ones and now generation with Texo works. How to force generation of ecore from Xcore file so that it references Ecore model from the global address?

Cheers,
Dominik
Re: [TEXO][Xcore] Generating JPA Entities from Xcore [message #1220434 is a reply to message #1220353] Wed, 11 December 2013 17:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Dominik,

I chatted with Martin and I suspect he just needs to use:

resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap(true));

These models load fine in the Ecore editor and that's what it does...

On 11/12/2013 2:12 PM, Dominik Leszyk wrote:
> Hi All,
>
> I'm trying to use Xcore together with Texo. After creating Xcore file
> I've created accompanying ecore file (using EMF Generator Model) as
> described on Xcore page. From such generated ecore file I try to
> invoke Texo (i.e. Texo / Generate Model + DAO Code) but then I got error:
>
>
> Diagnosis of
> platform:/resource/org.ngo.help.sample.model/model/model.ecore#/
> The feature 'eType' of
> 'platform:/resource/org.ngo.help.sample.model/model/model.ecore#//Library/name'
> contains an unresolved proxy
> 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'
> The feature 'eAttributeType' of
> 'platform:/resource/org.ngo.help.sample.model/model/model.ecore#//Library/name'
> contains an unresolved proxy
> 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'
>
>
> After looking into generated ecore file I see that there are local
> references to the file system:
>
>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> unique="false" eType="ecore:EDataType
> ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
>
>
> And when looking into examples of ecore files provided with Texo, it
> looks quite different, e.g.:
>
>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> unique="false" lowerBound="1"
> eType="ecore:EDataType
> http://www.eclipse.org/emf/2003/XMLType#//String">
>
>
> I manualy edited ecore file to use these global addresses instead of
> the local ones and now generation with Texo works. How to force
> generation of ecore from Xcore file so that it references Ecore model
> from the global address?
>
> Cheers,
> Dominik


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [TEXO][Xcore] Generating JPA Entities from Xcore [message #1220516 is a reply to message #1220434] Thu, 12 December 2013 10:07 Go to previous messageGo to next message
Dominik Leszyk is currently offline Dominik LeszykFriend
Messages: 22
Registered: December 2013
Junior Member
Ed, Thanks for the reply.

Martin, should I report this to bugzilla? Maybe I can offer a patch then (if I find place(-s) in the code... could take me a while:)).

BTW. seems that there is a similar problem in CDO (see my post from today).

Re: [TEXO][Xcore] Generating JPA Entities from Xcore [message #1220548 is a reply to message #1220516] Thu, 12 December 2013 14:01 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Dominik,
I published a new build with this addition. Can you try it?

I have entered a bugzilla myself for it:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=423904

I have put the XCore/Texo integration on my thought list, it was there already but moved up. It would be really nice to
make that more direct/fluent (directly generate code from xcore for example instead of going through a genmodel).

gr. Martin

On 12/12/2013 11:07 AM, Dominik Leszyk wrote:
> Ed, Thanks for the reply.
>
> Martin, should I report this to bugzilla? Maybe I can offer a patch then (if I find place(-s) in the code... could take
> me a while:)).
>
> BTW. seems that there is a similar problem in CDO (see my post from today).
>
>


--

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][Xcore] Generating JPA Entities from Xcore [message #1220610 is a reply to message #1220548] Thu, 12 December 2013 17:04 Go to previous messageGo to next message
Dominik Leszyk is currently offline Dominik LeszykFriend
Messages: 22
Registered: December 2013
Junior Member
Hi Martin,

> I published a new build with this addition. Can you try it?

Yes, sure. Please find my comment in the bugzilla that you've created.

> I have put the XCore/Texo integration on my thought list, it was there already but > moved up. It would be really nice to
> make that more direct/fluent (directly generate code from xcore for example instead > of going through a genmodel).

This would be great!

Dominik

Re: [TEXO][Xcore] Generating JPA Entities from Xcore [message #1289762 is a reply to message #1220353] Wed, 09 April 2014 16:16 Go to previous messageGo to next message
Moritz Höser is currently offline Moritz HöserFriend
Messages: 1
Registered: September 2012
Junior Member
Hi Martin,

I ran into the same issue and tried the newest stable and nightly version, but without luck.

Could you have a second look, please?

Also, I read somewhere in the Texo wiki pages that generating code from an Xcore file already works for you. Do you have any plans to release a version with this change? That would really come in handy. Thank you.
Re: [TEXO][Xcore] Generating JPA Entities from Xcore [message #1290510 is a reply to message #1289762] Thu, 10 April 2014 07:17 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Moritz,
The past days I have picked up the xcore integration, trying to get a working build with improved xcore handling. Xcore
works locally for me, but just not on the build server. I will update the issue when it runs through, am on it.

gr. Martin

On 04/09/2014 06:37 PM, Moritz Höser wrote:
> Hi Martin,
>
> I ran into the same issue and tried the newest stable and nightly version, but without luck.
>
> Could you have a second look, please?
>
> Also, I read somewhere in the Texo wiki pages that generating code from an Xcore file already works for you. Do you have
> any plans to release a version with this change? That would really come in handy. Thank you.


--

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][Xcore] Generating JPA Entities from Xcore [message #1386237 is a reply to message #1290510] Sun, 15 June 2014 17:39 Go to previous messageGo to next message
Anton Hughes is currently offline Anton HughesFriend
Messages: 66
Registered: January 2013
Member
Hello, I am also experiencing the same issue as described above by Dominik Leszyk.

Is there a work around for this, so that I am able to go from xcore to ecore, to texo?

Thanks and regards
Re: [TEXO][Xcore] Generating JPA Entities from Xcore [message #1386383 is a reply to message #1386237] Tue, 17 June 2014 09:05 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Anton,
Give me a few days to pick this up again. Feel free to ask for an update on the newsgroup.

gr. Martin

On 15-06-14 19:39, Anton Hughes wrote:
> Hello, I am also experiencing the same issue as described above by Dominik Leszyk.
>
> Is there a work around for this, so that I am able to go from xcore to ecore, to texo?
>
> Thanks and regards


--

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][Xcore] Generating JPA Entities from Xcore [message #1386496 is a reply to message #1386383] Tue, 17 June 2014 20:49 Go to previous messageGo to next message
Anton Hughes is currently offline Anton HughesFriend
Messages: 66
Registered: January 2013
Member
Thanks Martin, greatly appreciated.

Where do I find the newsgroup?
Re: [TEXO][Xcore] Generating JPA Entities from Xcore [message #1386534 is a reply to message #1386496] Wed, 18 June 2014 07:32 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
The posts on the forum are automatically synced with the newsgroup, so works fine :-).

gr. Martin

On 17-06-14 22:49, Anton Hughes wrote:
> Thanks Martin, greatly appreciated.
>
> Where do I find the newsgroup?


--

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:[EmfStore] Commit observe on server
Next Topic:Target platform for ECP and RAP
Goto Forum:
  


Current Time: Fri Apr 19 22:40:01 GMT 2024

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

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

Back to the top