xcore, ecore, emf, xtext and maven [message #1421046] |
Wed, 10 September 2014 17:46  |
Eclipse User |
|
|
|
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 08:16  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04089 seconds