Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xtext cross-reference from another location(xtext cross-reference from another location)
xtext cross-reference from another location [message #1741642] Fri, 26 August 2016 14:03 Go to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Hi,

How to cross reference outside files?
Re: xtext cross-reference from another location [message #1741643 is a reply to message #1741642] Fri, 26 August 2016 14:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
if you mean cross refs from test.mydsl to other.mydsl:
this works out of the box if you do proper naming/referencing (and have build automatically on)

if you mean something else: please elaborate


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: xtext cross-reference from another location [message #1741644 is a reply to message #1741643] Fri, 26 August 2016 14:30 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
My file extension is jpl and I have two files like test1.jpl and test2.jpl. test1.jpl contains "call test" and test2.jpl contain "proc test". While click on "call test" it is not going to "proc test". If both are in same page it is working. And my project auto build is enabled.
Re: xtext cross-reference from another location [message #1741645 is a reply to message #1741644] Fri, 26 August 2016 14:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
are you sure the naming is proper? if you use the "open model element dialog" from the navigate menu, what is the names of the procs?

can you please share a small example based on the hello world grammar from the last time with

- the grammar you use
- both model file


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: xtext cross-reference from another location [message #1741647 is a reply to message #1741645] Fri, 26 August 2016 14:49 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
It is working in new project with simple grammar like:

Call: 'call' ref=[Proc];

Proc: 'proc' name=ID;

But is not working for :

Call: 'call' ref=[Proc]('(' (exp+=Expression (','? exp+=Expression)*)? ')')?;

Proc: ('string'|'double')? ('proc') name=ID('(' (exp+=Expression (','? exp+=Expression)*)? ')')?;
Re: xtext cross-reference from another location [message #1741649 is a reply to message #1741647] Fri, 26 August 2016 15:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
what does the open model element dialog show?

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: xtext cross-reference from another location [message #1741651 is a reply to message #1741649] Fri, 26 August 2016 15:10 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Couldn't resolve reference to Proc 'test'.

[Updated on: Fri, 26 August 2016 15:12]

Report message to a moderator

Re: xtext cross-reference from another location [message #1741652 is a reply to message #1741651] Fri, 26 August 2016 15:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
no the open model element dialog in the navigate menu / cmd+shift+F3 / crtl+Shift+F3 on windows if i remember correctly

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: xtext cross-reference from another location [message #1741654 is a reply to message #1741652] Fri, 26 August 2016 15:29 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
index.php/fa/26892/0/
  • Attachment: openmodel.png
    (Size: 21.19KB, Downloaded 125 times)
Re: xtext cross-reference from another location [message #1741655 is a reply to message #1741654] Fri, 26 August 2016 15:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
sure you have build automatically on? and have built the project?
did you disable the builder in your language?
what does the dialog show with the hello world example?


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: xtext cross-reference from another location [message #1741659 is a reply to message #1741655] Fri, 26 August 2016 16:04 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
hello world example showing all matches in open dialog
Re: xtext cross-reference from another location [message #1741660 is a reply to message #1741659] Fri, 26 August 2016 16:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
then there must be some customization in your code that prevents that

- IQualifiedNameProvider
- IDefaultResourceDescriptionStrategy


.....


and double check you have build automatically on, the project having xtext nature and did a clean build in the workspace


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: xtext cross-reference from another location [message #1741661 is a reply to message #1741660] Fri, 26 August 2016 16:39 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
I removed xtext nature of the project. Maybe it is a problem?
Re: xtext cross-reference from another location [message #1741662 is a reply to message #1741661] Fri, 26 August 2016 16:41 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
YES !!!

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Previous Topic:Xtext: How to active hyperlink?
Next Topic:How to iterate over the grammar
Goto Forum:
  


Current Time: Fri Dec 15 12:02:16 GMT 2017

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

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