How to add Annotations to the grammar [message #886570] |
Fri, 15 June 2012 07:38 |
Hans-Georg Glöckler Messages: 88 Registered: July 2009 |
Member |
|
|
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 07:42] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03511 seconds