Reputation: 11875
I am trying to create a DSL in the following syntax :
alias date java.util.Date;
so what I have in my grammar is something like this :
import "http://www.eclipse.org/xtext/common/JavaVMTypes" as jvmTypes
Model:
(types+= Type)*;
Type:
Alias | Class;
PackageName:
ID ('.' ID)*;
Alias:
'alias' name = ID javaType=[jvmTypes::JvmType|PackageName] ';' ;
This doesn't seem to be working.
I am looking at the article : http://www.eclipse.org/Xtext/documentation/2_0_0/199a-jvmtypes.php which does something very similar. Not sure what I am missing here.
Upvotes: 3
Views: 1042
Reputation: 11875
Finally got it.
Adding this worked
registerGenModelFile = "platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel"
Note :
The official tutorial mentioned that this should be added.
registerGenModelFile =
"platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel"
The MWE2 workflow never ran to success with that, complaining that this model could not be located.
Upvotes: 1