Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xbase - Maven Plugin for EntityDSL
Xbase - Maven Plugin for EntityDSL [message #1221986] Thu, 19 December 2013 08:20 Go to next message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

Hi,

i have been writing a DSL for JPA-Entities. It is licended under the EPL and will be made available by the marketplace soon.

I tried to write a maven-plugin like Xtend offers. The generated JPA-entity sourcefiles should not be pushed to git repo, but instead a maven plugin should compile them to java files during build.

So i used the xtend-maven-plugin as a cheatsheet and implemented the plugin. So far, it works fine, but i got one issue i can not solve. Crossreferences to different resources can not be resolved. Crossreferences contained in the same resources as treated properly. For instance if A.entitymodel has a crossrefence to B.entitymodel, the reference can not be resolved. Resource A and B are contained in the sames ResourceSet.

I debugged for days now and maybe i got a problem with proxy resolution.

What did i do:
For instance the inheritance of entities (entity Customer extends Base). I used opposite references in ecore model. The "superType" reference is "resolveProxies==false" and "subTypes" reference is defined as "transient==true" and "resolveProxies==true".

I think that this reference causes the problem.

Any ideas how to solve it?

Best Florian




Re: Xbase - Maven Plugin for EntityDSL [message #1221997 is a reply to message #1221986] Thu, 19 December 2013 10:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13669
Registered: July 2009
Senior Member
Hi,

did you have a look at the generic xtext maven plugin http://www.eclipse.org/forums/index.php/t/602210/


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xbase - Maven Plugin for EntityDSL [message #1222014 is a reply to message #1221997] Thu, 19 December 2013 11:21 Go to previous messageGo to next message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

Thanks for the hint!

Got a new result. StateBasedContainer#filterByURI seems to be the problem.
It tries to find platform:/resource uris. But only file:// uris for the entity models are available. If i batch the filter, then crossreferences can be resolved.

Will take a look at the generic maven plugin.

Thanks, Florian
Re: Xbase - Maven Plugin for EntityDSL [message #1222062 is a reply to message #1222014] Thu, 19 December 2013 15:30 Go to previous message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

Now i am feeding the file:// uris into XtextResourceSet an compile works fine...

Best Florian
Previous Topic:Xtext - Batch-classes
Next Topic:Xtend To UML generator
Goto Forum:
  


Current Time: Sat Dec 05 01:00:52 GMT 2020

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

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

Back to the top