Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Errors in generated java code when extending Xcore
Errors in generated java code when extending Xcore [message #1376688] Fri, 23 May 2014 14:32 Go to next message
Eclipse UserFriend
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 #1378113 is a reply to message #1376688] Sat, 24 May 2014 04:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26215
Registered: July 2009
Senior Member
Florian,

This look really more like a question best sent to the TMF forum. I
expect an answer requires a good understanding of what's in Xcore's
workflow and based on that what's supposed to be in your extended
grammar's workflow. From the look of it, you're generating some type of
serializer that wants to extend a serializer that's not of the expected
form in Xcore itself. I know the IncQuery project extends Xcore, so you
might want to have a look at their source and see how they've configured
their extension in their workflow.

On 23/05/2014 4:32 PM, Florian König wrote:
> 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 #1381467 is a reply to message #1378113] Sun, 25 May 2014 15:19 Go to previous message
Eclipse UserFriend
Hi Ed,
Thanks for your suggestions! I will try my luck in the TMF forum and I
will take a deeper look into the IncQuery project (already found it
earlier).

Am 24.05.2014 06:51, schrieb Ed Merks:
> Florian,
>
> This look really more like a question best sent to the TMF forum. I
> expect an answer requires a good understanding of what's in Xcore's
> workflow and based on that what's supposed to be in your extended
> grammar's workflow. From the look of it, you're generating some type of
> serializer that wants to extend a serializer that's not of the expected
> form in Xcore itself. I know the IncQuery project extends Xcore, so you
> might want to have a look at their source and see how they've configured
> their extension in their workflow.
>
> On 23/05/2014 4:32 PM, Florian König wrote:
>> 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
>
Previous Topic:Propagating EObject status to all referencing EObjects
Next Topic:New EClass instance validation
Goto Forum:
  


Current Time: Mon Nov 24 03:58:46 GMT 2014

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

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