Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext: Cross-Referenzce + JvmTypeReference
Xtext: Cross-Referenzce + JvmTypeReference [message #876866] Fri, 25 May 2012 12:14 Go to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
I want ot extend from Entity and JvmTypeReference. So the content assist should provide entries for each JvmTypeReference but also for defined entities that have not been compiled to java code yet.

Entity:
	'entity' name=ID ('extends' superType=([Entity] | JvmTypeReference))? '{'
	features+=Feature*
	'}'
	;


Referring to org.eclipse.xtext.example.domainmodel.Domainmodel.

Is there a way to do so?
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #876875 is a reply to message #876866] Fri, 25 May 2012 12:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13271
Registered: July 2009
Senior Member
Hi,

there is this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=350823
the only way i know is to introduce a extra keyword

Entity:
'entity' name=ID ( ('extends' superType=[Entity]) | ('extendsjava' JvmTypeReference))? '{'
features+=Feature*
'}'
;


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #876881 is a reply to message #876875] Fri, 25 May 2012 12:46 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
Thanks.
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1416115 is a reply to message #876881] Thu, 04 September 2014 11:02 Go to previous messageGo to next message
Pavlina Temelakieva is currently offline Pavlina TemelakievaFriend
Messages: 10
Registered: July 2014
Junior Member
Hey, I have similar question:

Is it possible to reference types combining Cross-Reference and JvmTypeReference?
e.g. : type=([Entity] | JvmTypeReference)

So far I am not able to make it work. It doesn't recognize the JvmTypeReference types.
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1416144 is a reply to message #1416115] Thu, 04 September 2014 12:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13271
Registered: July 2009
Senior Member
No, it has to unambigous

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1419267 is a reply to message #1416144] Mon, 08 September 2014 10:51 Go to previous messageGo to next message
Pavlina Temelakieva is currently offline Pavlina TemelakievaFriend
Messages: 10
Registered: July 2014
Junior Member
Is there a workaround for that or it is entirely impossible?
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1419335 is a reply to message #1419267] Mon, 08 September 2014 12:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13271
Registered: July 2009
Senior Member
hi,

what about introducing a prefex e.g.

("/" type=[Entity]) | jvmType=JvmTypeReference)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1419872 is a reply to message #1419335] Tue, 09 September 2014 07:45 Go to previous messageGo to next message
Pavlina Temelakieva is currently offline Pavlina TemelakievaFriend
Messages: 10
Registered: July 2014
Junior Member
Just out of curiosity..what is the "/" for?
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1419990 is a reply to message #1419872] Tue, 09 September 2014 10:52 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13271
Registered: July 2009
Senior Member
Hi "itisarandomlychosenkeywordorsymbol" to make the syntax
unambiguous so it could have been "$" or "entity" as well


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[Xpand/Xtend] : xtext extensions importation
Next Topic:Add eObject to the parse tree programaticaly
Goto Forum:
  


Current Time: Thu Dec 12 08:31:34 GMT 2019

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

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

Back to the top