I wan to add Annotations to the grammar.
I have tried the following code
grammar org.lunifera.metamodel.dsl.entity.Entity with org.eclipse.xtext.xbase.Xbase
generate entity "http://www.lunifera.org/metamodel/dsl/entity/Entity"
import "http://www.eclipse.org/xtext/xbase/Xbase" as xbase
...
Entity:
(annotations=Annotation)
'entity' name=ValidID ('extends' superType=JvmParameterizedTypeReference)? '{'
property+=Property*
....
'}';
Property:
varType= 'var' type=JvmTypeReference name=ValidID ';';
enum Annotation:
embeddable='@Embeddable' | cachable='@Cachable'
;
In my DSL I want to can write:
@Embeddabel
entity Person {
....
}
But I have Problems with the Annotations.
They appear not in the Content Assist of the IDE
Also entity appear not in the Content Assist of the IDE
I use Xtext 2.3
[Updated on: Fri, 15 June 2012 03:42] by Moderator