Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XAnnotations in 2.4
XAnnotations in 2.4 [message #1068149] Fri, 12 July 2013 12:27 Go to next message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

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


Re: XAnnotations in 2.4 [message #1068153 is a reply to message #1068149] Fri, 12 July 2013 12:45 Go to previous message
Florian Pirchner is currently offline Florian PirchnerFriend
Messages: 94
Registered: July 2009
Member

And after adding a second entity following error is shown:

Duplicate type org.my.test.null in container
Previous Topic:Filter Java types in content assist
Next Topic:Problem parsing xtext from variable: references missing
Goto Forum:
  


Current Time: Fri Apr 26 19:32:00 GMT 2024

Powered by FUDForum. Page generated in 0.03077 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top