Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Tycho/Maven XCore code generation
Tycho/Maven XCore code generation [message #1722821] Tue, 09 February 2016 12:11 Go to next message
Hans-Erik Floryd is currently offline Hans-Erik FlorydFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

I have a project using XCore models, where the models live in different plugins and may reference each other.

I was trying to use Tycho/Maven to generate the sources, and was able to get it to work for a self-contained model using information found on this forum. However, it doesn't seem to work when a model uses model objects from another plugin.

I put together a small test-case to show the problem here:
https://github.com/hefloryd/tycho-xcore-testcase

The testcase contains two models where model.a uses a class from model.b. Code-generation works fine in the IDE. When I use maven to build, code-generation works fine for model.b, but for model.a it fails with the following error message:

[ERROR] ERROR:B cannot be resolved. (file:/P:/GitHub/tycho-xcore-testcase/model.a/model/a.xcore line : 6 column : 11)
[WARNING] WARNING:The import 'model.b.B' is never used (file:/P:/GitHub/tycho-xcore-testcase/model.a/model/a.xcore line : 3 column : null)
[ERROR] ERROR:A generic type in this context must refer to a classifier or a type parameter (file:/P:/GitHub/tycho-xcore-testcase/model.a/model/a.xcore line : 6 column : null)


This error is similar to what you would get if model.b.B was an unwrapped java type, so presumably the problem may be that the code-generation is not aware that model.b.B is a model object.

Is there any GenModel annotation that would help solve this?

Thanks,
Hans-Erik

Re: Tycho/Maven XCore code generation [message #1723090 is a reply to message #1722821] Thu, 11 February 2016 14:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Sorry, I'm just not familiar with how things behave in a Tycho/Maven
build. You could open a bugzilla, and maybe eventually I'll have time
to look, but that's unlikely for at least the next two months...


On 09.02.2016 18:14, Hans-Erik Floryd wrote:
> Hello,
>
> I have a project using XCore models, where the models live in
> different plugins and may reference each other.
> I was trying to use Tycho/Maven to generate the sources, and was able
> to get it to work for a self-contained model using information found
> on this forum. However, it doesn't seem to work when a model uses
> model objects from another plugin.
>
> I put together a small test-case to show the problem here:
> https://github.com/hefloryd/tycho-xcore-testcase
>
> The testcase contains two models where model.a uses a class from
> model.b. Code-generation works fine in the IDE. When I use maven to
> build, code-generation works fine for model.b, but for model.a it
> fails with the following error message:
>
>
> [ERROR] ERROR:B cannot be resolved.
> (file:/P:/GitHub/tycho-xcore-testcase/model.a/model/a.xcore line : 6
> column : 11)
> [WARNING] WARNING:The import 'model.b.B' is never used
> (file:/P:/GitHub/tycho-xcore-testcase/model.a/model/a.xcore line : 3
> column : null)
> [ERROR] ERROR:A generic type in this context must refer to a
> classifier or a type parameter
> (file:/P:/GitHub/tycho-xcore-testcase/model.a/model/a.xcore line : 6
> column : null)
>
>
> This error is similar to what you would get if model.b.B was an
> unwrapped java type, so presumably the problem may be that the
> code-generation is not aware that model.b.B is a model object.
> Is there any GenModel annotation that would help solve this?
>
> Thanks,
> Hans-Erik
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Tycho/Maven XCore code generation [message #1723110 is a reply to message #1723090] Thu, 11 February 2016 17:23 Go to previous message
Hans-Erik Floryd is currently offline Hans-Erik FlorydFriend
Messages: 2
Registered: July 2009
Junior Member
Ok, I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=487683

Thanks,
Hans-Erik
Previous Topic:CDO performance
Next Topic:M2M transformation on a model open in an editor already
Goto Forum:
  


Current Time: Thu Apr 25 19:04:41 GMT 2024

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

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

Back to the top