Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] Error importing ecore.EcorePackage in generated class
[Xcore] Error importing ecore.EcorePackage in generated class [message #986917] Thu, 22 November 2012 11:18 Go to next message
Jan Rosczak is currently offline Jan RosczakFriend
Messages: 53
Registered: July 2009
Location: Hamburg, Germany
Member
Hi,

I am using Xcore 1.0.1 in Eclipse 3.8. I have created an Xcore/Xtext project, defined my model und everythings worked like a charm.

Now I want to build my plugin with tycho/maven. As far as I figured it out, I need a mwe2 workflow invoking the XcoreGenerator.

In order to solve dependencies I added the plugins org.eclipse.emf.mwe2.launch and org.eclipse.emf.ecore.xcore as optional dependencies. Running my maven build everything seems to work.

But, when I clean/build the project in the Eclipse workspace I get an error in the generating class: The import ecore cannot be resolved. Looking in the PackageImpl class I see the import "ecore.EcorePackage". Why is this package shortened?

Removing the two optional dependencies mentioned above, clean/build in the workspace works. Adding the optional dependencies client/build in the workspace fails.

Am I doing something wrong or what can I do to resolve this?

Thanks
Jan
Re: [Xcore] Error importing ecore.EcorePackage in generated class [message #986983 is a reply to message #986917] Thu, 22 November 2012 17:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Jan,

Comments below.

On 22/11/2012 12:18 PM, Jan Rosczak wrote:
> Hi,
>
> I am using Xcore 1.0.1 in Eclipse 3.8. I have created an Xcore/Xtext
> project, defined my model und everythings worked like a charm.
>
> Now I want to build my plugin with tycho/maven. As far as I figured it
> out, I need a mwe2 workflow invoking the XcoreGenerator.
>
> In order to solve dependencies I added the plugins
> org.eclipse.emf.mwe2.launch and org.eclipse.emf.ecore.xcore as
> optional dependencies. Running my maven build everything seems to work.
>
> But, when I clean/build the project in the Eclipse workspace I get an
> error in the generating class: The import ecore cannot be resolved.
> Looking in the PackageImpl class I see the import
> "ecore.EcorePackage". Why is this package shortened?
Someone else complain about this recently. It seems to boil down to a
problem with the GenModel for Xtext not specifying Ecore.genmodel's
GenPackage as a usedGenPackage.
>
> Removing the two optional dependencies mentioned above, clean/build in
> the workspace works. Adding the optional dependencies client/build in
> the workspace fails.
>
> Am I doing something wrong or what can I do to resolve this?
If you can share a self contained zip file with projects demonstrating
this problem, I'll be able to track it down; I think there might already
be an Xtext bugzilla for this...
>
> Thanks
> Jan


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] Error importing ecore.EcorePackage in generated class [message #987385 is a reply to message #986983] Mon, 26 November 2012 11:53 Go to previous message
Jan Rosczak is currently offline Jan RosczakFriend
Messages: 53
Registered: July 2009
Location: Hamburg, Germany
Member
Hi Ed,

thanks for your quick response. I am currently not able to publish my project (company policy), but I tried to setup a dummy project that exhibits the same error, with no success. I will come back when the errors presents itself in a project I can share.

Regards
Jan
Previous Topic:[CDO] Server does not send 'Respository ADDED' event
Next Topic:Querying EMF model with Xpath
Goto Forum:
  


Current Time: Tue Apr 23 13:44:32 GMT 2024

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

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

Back to the top