Skip to main content



      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 10:03 Go to next message
Eclipse UserFriend
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 10:17 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: xtext cross-reference from another location [message #1741644 is a reply to message #1741643] Fri, 26 August 2016 10:30 Go to previous messageGo to next message
Eclipse UserFriend
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 10:41 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: xtext cross-reference from another location [message #1741647 is a reply to message #1741645] Fri, 26 August 2016 10:49 Go to previous messageGo to next message
Eclipse UserFriend
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 11:07 Go to previous messageGo to next message
Eclipse UserFriend
what does the open model element dialog show?
Re: xtext cross-reference from another location [message #1741651 is a reply to message #1741649] Fri, 26 August 2016 11:10 Go to previous messageGo to next message
Eclipse UserFriend
Couldn't resolve reference to Proc 'test'.

[Updated on: Fri, 26 August 2016 11:12] by Moderator

Re: xtext cross-reference from another location [message #1741652 is a reply to message #1741651] Fri, 26 August 2016 11:16 Go to previous messageGo to next message
Eclipse UserFriend
no the open model element dialog in the navigate menu / cmd+shift+F3 / crtl+Shift+F3 on windows if i remember correctly
Re: xtext cross-reference from another location [message #1741654 is a reply to message #1741652] Fri, 26 August 2016 11:29 Go to previous messageGo to next message
Eclipse UserFriend
index.php/fa/26892/0/
  • Attachment: openmodel.png
    (Size: 21.19KB, Downloaded 270 times)
Re: xtext cross-reference from another location [message #1741655 is a reply to message #1741654] Fri, 26 August 2016 11:35 Go to previous messageGo to next message
Eclipse UserFriend
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?
Re: xtext cross-reference from another location [message #1741659 is a reply to message #1741655] Fri, 26 August 2016 12:04 Go to previous messageGo to next message
Eclipse UserFriend
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 12:11 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: xtext cross-reference from another location [message #1741661 is a reply to message #1741660] Fri, 26 August 2016 12:39 Go to previous messageGo to next message
Eclipse UserFriend
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 12:41 Go to previous message
Eclipse UserFriend
YES !!!
Previous Topic:Xtext: How to active hyperlink?
Next Topic:How to iterate over the grammar
Goto Forum:
  


Current Time: Tue Jul 15 09:53:28 EDT 2025

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

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

Back to the top