Hi,
i have been writing a JPA entity DSL in Xtext 2.3 based on XBaseWithAnnotations.
Everything was fine so far. I followed the implementation of Xtend and everything worked properly.
Now i migrated to 2.4 and strange things are happening. It seems that two instances of semantic elements are created for one syntactic element.
Class returns LClass:
{LClass} annotations+=LAnnotationDef*
(
{LEntity.annotationInfo=current}
(abstract?='abstract')?
'entity' name=ValidIDWithKeywords ('extends' superType=[LEntity])?
'{' properties+=LEntityProp*
indexes+=LIndex*
operations+=LOperation*
'}'
|
{LBean.annotationInfo = current}
'bean'
)
The rule above should create an instance of LEntity if "entity" is specified. But 2 instances are prepared instead
1) LEntity with name=null
2) LEntity - the proper one
Both entities are shown in context assist:
E1 - org.my.test.E1
null - org.my.test.null
I tried to figure out the difference between the entity DSL and Xtend. But everything is fine. Using a similar ecore model with AnnotationTarget as super class.
Any ideas where i could continue my research? Do not have any ideas how to solve.
Thanks a lot
best, Florian