Errors in generated java code when extending Xcore [message #1381442] |
Sun, 25 May 2014 15:03 |
Eclipse User |
|
|
|
Hi,
I am working on a DSL in which I want to use features from Xcore.
I added dependencies org.eclipse.emf.ecore.xcore;bundle-version="1.1.2"
to the main project and
org.eclipse.emf.ecore.xcore.ui;bundle-version="1.1.1" to the UI project,
then I created a language like this:
grammar org.xtext.example.extendedxcore.ExtendedXcore with
org.eclipse.emf.ecore.xcore.Xcore
generate extendedXcore
"http://www.xtext.org/example/extendedxcore/ExtendedXcore"
import "http://www.eclipse.org/emf/2011/Xcore" as xcore
EXcore:
package=XPackage
extension=Extension;
Extension:
'selection' name=ID '{'
selected+=Select*
'}';
Select:
'select' class=[xcore::XClass];
I then added the following lines to the Workflow file:
registerGeneratedEPackage = "org.eclipse.emf.ecore.xcore.XcorePackage"
registerGenModelFile =
"platform:/resource/org.eclipse.emf.ecore.xcore/model/Xcore.genmodel"
When I run the workflow now I get lots of errors in the generated java
files and I can't figure out how to fix that...
I pasted the list of errors here: http://pastebin.com/05sSHXhV
Most of them seem to speak of missing dependencies, but I don't know
what is missing. Any idea?
Thanks for any suggestions,
Florian
|
|
|
|
Re: Errors in generated java code when extending Xcore [message #1383961 is a reply to message #1383789] |
Tue, 27 May 2014 13:15 |
Eclipse User |
|
|
|
Hi,
thanks for the info, I indeed use Xtext 2.6.0 and now I switch to 2.5.4.
Unfortunately I do not know what I could modify in the mwe2 file.. I
tried the thinks you did in your blog post, but they do not change
anything in my project.
I was playing around with the errors and there are 3 sources of error:
Screenshots:
https://www.dropbox.com/sh/ihh188cgdwtnqq7/AAB59gGRc2KbNHh9FoZRnLZDa
In the main project:
- AbstractExtendedXcoreRuntimeModule:
missing cast
- ExtendedXcoreSemanticSequencer
- unresolved import of
org.eclipse.emf.ecore.xcore.serializer.XcoreSemanticSequencer;
- unresolved superclass XcoreSemanticSequencer
I can change this to XbaseSemanticSequencer, which solves many errors
in this file
- undefined methods "sequence_X..."
these stay when changing the extends command, but when I delete these
I can run the project as EclipseApplication
- AbstractExtendedXcoreValidator
- unresolved superclass
org.eclipse.emf.ecore.xcore.validation.XcoreValidator
when I delete the extends command and the @Override statement I can
run the project
So when I simply delete the errors, I can run the project, but I do not
know, why they are there and how I can fix that automatically.
Any idea what is to do now?
|
|
|
Powered by
FUDForum. Page generated in 0.38241 seconds