JvmType Reference in XText DSL based on XCore model [Luna] [message #1401223] |
Tue, 15 July 2014 05:58  |
Eclipse User |
|
|
|
Hello,
I'm currently building a DSL with XText that is based on a XCore model. This was previously still based on Eclipse Juno (XCore 1.0.x, XText 2.4.x) and now I'm trying to update to Eclipse Luna (XCore 1.2.x, XText 2.6.x).
With the Juno variant the usage of JvmType in both the XCore model and the XText grammar worked fine.
When updating to Luna I get errors that the expected type JvmType is not compatible with the type JvmType (detailed error see example below).
I also created a simple example with a fresh XCore project and a fresh XText DSL like the following:
XCore
package appmodel
import org.eclipse.xtext.common.types.JvmType
class Foo {
String foobar
refers JvmType javaClass
}
XText Grammar
grammar appdsl.AppDsl with org.eclipse.xtext.common.Terminals
import "appmodel"
import "http://www.eclipse.org/xtext/common/JavaVMTypes" as jvmTypes
Foo:
{Foo}
'type' foobar=STRING '>' javaClass=[jvmTypes::JvmType]
;
Though the XText grammar yields the following error at the assignment of the javaClass feature:
Cannot find compatible feature javaClass in sealed EClass Foo from imported package appmodel: The existing reference 'javaClass' has an incompatible type 'JvmType'. The expected type is 'JvmType'.
I'm currently unsure why this worked in the Juno based version before, any ideas?
I also attached my test project, which has been checked in a Luna RCP with XCore 1.2.0 and XText 2.6.2.
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.15626 seconds