Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xcore, ecore, emf, xtext and maven
xcore, ecore, emf, xtext and maven [message #1421046] Wed, 10 September 2014 21:46 Go to next message
Richard Melvin is currently offline Richard MelvinFriend
Messages: 7
Registered: July 2009
Junior Member
I followed Lorenzo Bettini's tutorial (which I can't link to, but Google should find) to try to use xcore for defining the underlying EMF model.

It works as far as exporting the xcore file, and running the mwe2 workflow within eclipse. But from maven, using the usual exec-maven-plugin/Mwe2Launcher approach, it fails when loading the xcore file. The exact error message depends on the dependencies supplied to exec-maven-plugin, probably the furthest it has got is with:

org.eclipse.emf.ecore.xcore
org.eclipse.emf.ecore.xcore.lib
org.eclipse.emf.codegen.ecore.xtext
org.eclipse.emf.ecore
org.eclipse.emf.common
org.eclipse.emf.codegen.ecore
org.eclipse.xtext.dependencies
org.eclipse.xtext.xbase
org.eclipse.xtext.xbase.lib
org.eclipse.xtext
org.eclipse.xtext.xtext
org.eclipse.xtext.common.types


which gets:

XtextLinkingDiagnostic: null:33 Couldn't resolve reference to GenBase 'BigInteger'

which presumably has something to do with the ecore::EBigInteger's my grammar uses as terminals.

Does anyone have one of more of:


  • a solution
  • some documentaiton of what all the different bundles are
  • a working example of this kind of thing
  • a suggestion for how to investigate further?


Re: xcore, ecore, emf, xtext and maven [message #1421476 is a reply to message #1421046] Thu, 11 September 2014 12:16 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1759
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/09/2014 03:03, Richard Melvin wrote:
> I followed Lorenzo Bettini's tutorial (which I can't link to, but Google
> should find) to try to use xcore for defining the underlying EMF model.
> It works as far as exporting the xcore file, and running the mwe2
> workflow within eclipse. But from maven, using the usual
> exec-maven-plugin/Mwe2Launcher approach, it fails when loading the xcore
> file. The exact error message depends on the dependencies supplied to
> exec-maven-plugin, probably the furthest it has got is with:
>
> org.eclipse.emf.ecore.xcore
> org.eclipse.emf.ecore.xcore.lib
> org.eclipse.emf.codegen.ecore.xtext
> org.eclipse.emf.ecore
> org.eclipse.emf.common
> org.eclipse.emf.codegen.ecore
> org.eclipse.xtext.dependencies
> org.eclipse.xtext.xbase
> org.eclipse.xtext.xbase.lib
> org.eclipse.xtext
> org.eclipse.xtext.xtext
> org.eclipse.xtext.common.types
>
>
> which gets:
>
> XtextLinkingDiagnostic: null:33 Couldn't resolve reference to GenBase
> 'BigInteger'
>
> which presumably has something to do with the ecore::EBigInteger's my
> grammar uses as terminals.
>
> Does anyone have one of more of:
>
>
> a solution
> some documentaiton of what all the different bundles are
> a working example of this kind of thing
> a suggestion for how to investigate further?
>
>
>

Hi Richard

You can run an mwe2 file from maven (using the fornax plug-in), as you
can see here:

https://github.com/LorenzoBettini/xsemantics/blob/master/plugins/it.xsemantics.dsl/src/it/xsemantics/dsl/GenerateXsemanticsModel.mwe2

Note that this also uses de.itemis.xcore2java.XcoreReader originally
written by Christian (you can find that in the sources of the above
project).

hope this helps
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Previous Topic:[solved] Accessing types and their properties from another file (with same grammar)
Next Topic:[solved] [Xbase] java like variable declaration
Goto Forum:
  


Current Time: Fri Dec 13 21:11:36 GMT 2019

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

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

Back to the top