[Xcore] Problem with an .xcore model refering to a class defined in a .ecore model [message #978039] |
Fri, 09 November 2012 15:00  |
Eclipse User |
|
|
|
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 01:41  |
Eclipse User |
|
|
|
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 !
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05718 seconds