Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Xtext: Cross-Referenzce + JvmTypeReference
Xtext: Cross-Referenzce + JvmTypeReference [message #876866] Fri, 25 May 2012 08:14 Go to next message
Eclipse UserFriend
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 08:40 Go to previous messageGo to next message
Eclipse UserFriend
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*
'}'
;
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #876881 is a reply to message #876875] Fri, 25 May 2012 08:46 Go to previous messageGo to next message
Eclipse UserFriend
Thanks.
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1416115 is a reply to message #876881] Thu, 04 September 2014 07:02 Go to previous messageGo to next message
Eclipse UserFriend
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 08:29 Go to previous messageGo to next message
Eclipse UserFriend
No, it has to unambigous
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1419267 is a reply to message #1416144] Mon, 08 September 2014 06:51 Go to previous messageGo to next message
Eclipse UserFriend
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 08:52 Go to previous messageGo to next message
Eclipse UserFriend
hi,

what about introducing a prefex e.g.

("/" type=[Entity]) | jvmType=JvmTypeReference)
Re: Xtext: Cross-Referenzce + JvmTypeReference [message #1419872 is a reply to message #1419335] Tue, 09 September 2014 03:45 Go to previous messageGo to next message
Eclipse UserFriend
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 06:52 Go to previous message
Eclipse UserFriend
Hi "itisarandomlychosenkeywordorsymbol" to make the syntax
unambiguous so it could have been "$" or "entity" as well
Previous Topic:[Xpand/Xtend] : xtext extensions importation
Next Topic:Add eObject to the parse tree programaticaly
Goto Forum:
  


Current Time: Wed Jul 02 17:29:31 EDT 2025

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

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

Back to the top