Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] Problem with an .xcore model refering to a class defined in a .ecore model(Problem with an .xcore model refering to a class defined in a .ecore model)
[Xcore] Problem with an .xcore model refering to a class defined in a .ecore model [message #978039] Fri, 09 November 2012 20:00 Go to next message
Pierre Allard is currently offline Pierre Allard
Messages: 3
Registered: November 2012
Junior Member
Hi,

Here is a description of the setup I am using.

I have two EMF models, lets call them ModelA and ModelB.

ModelA is defined in an .ecore, the project containing it has an Xtext nature.
ModelA defines Classes A, B and C. C contains two String attributes (very simple).

ModelB is defined in an .xcore, the project containing it has an Xtext nature.
Model B defines a Class D that refers to classes defined in ModelA:

- contains A a (this is ok)
- refers B b (this is ok)
- contains C c (this is not working !)

The Xcore editor underlines the C and gives me the following error description:

"A generic type in this context must refer to a classifier or a type parameter"

I have the proper import statement for the C class, and the Xcore editor even gives me C in the code assist when I define the c reference.

What is curious is that the statements making use of A and B works just fine (if I comment out "contains C c", the code gets generated correctly). I have tried cleaning all projects, restarting Eclipse, nothing make the error go away.

What am I doing wrong ?

Thanks !

Re: [Xcore] Problem with an .xcore model refering to a class defined in a .ecore model [message #978602 is a reply to message #978039] Sat, 10 November 2012 06:41 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26126
Registered: July 2009
Senior Member
Pierre,

Comments below.

On 09/11/2012 9:07 PM, Pierre Allard wrote:
> Hi,
>
> Here is a description of the setup I am using.
>
> I have two EMF models, lets call them ModelA and ModelB.
>
> ModelA is defined in an .ecore, the project containing it has an Xtext
> nature.
> ModelA defines Classes A, B and C. C contains two String attributes
> (very simple).
>
> ModelB is defined in an .xcore, the project containing it has an Xtext
> nature.
> Model B defines a Class D that refers to classes defined in ModelA:
>
> - contains A a (this is ok)
> - refers B b (this is ok)
> - contains C c (this is not working !)
>
> The Xcore editor underlines the C and gives me the following error
> description:
>
> "A generic type in this context must refer to a classifier or a type
> parameter"
>
> I have the proper import statement for the C class, and the Xcore
> editor even gives me C in the code assist when I define the c reference.
>
> What is curious is that the statements making use of A and B works
> just fine (if I comment out "contains C c", the code gets generated
> correctly). I have tried cleaning all projects, restarting Eclipse,
> nothing make the error go away.
>
> What am I doing wrong ?
It sounds very strange. Please export the two projects to a zip file
and attach it to a bugzilla.
>
> Thanks !
>
>
Previous Topic:Net4j Oracle DB Adaptor
Next Topic:Validator and generated source in xbase
Goto Forum:
  


Current Time: Mon Oct 20 17:57:17 GMT 2014

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

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