Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross Reference to a file name
Cross Reference to a file name [message #647357] Wed, 05 January 2011 18:30 Go to next message
Jake is currently offline JakeFriend
Messages: 21
Registered: November 2010
Junior Member
Hi, in my language I've an include statement. The SimpleNamesFragment
allow me to have link mechanism between grammars elements in different
files, but I don't know how to link the file name after "include" with
the file.

example:

file1.iws:
******************
include "file2.iws"

main {

one = 2 +4;
two
}
*****************


file2.iws:
******************
var one : int
var two : int
*****************


with this (simplified here):

Assign :
[var] '=' ID op ID

Var : 'var' ID ':' Type

I have the linking mechanism working, but how can I do to have the same
for the file? How to implement it with a simple scope provider?
thankyou in advance
Re: Cross Reference to a file name [message #647362 is a reply to message #647357] Wed, 05 January 2011 18:48 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

> I have the linking mechanism working, but how can I do to have the same
> for the file?
Do you mean "jumping to the file" on pressing F3 on the file name? By
default this is implemented for cross references only. Your starting
point would be the HyperlinkHelper. You might be able to find a couple
of threads in this forum.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Cross Reference to a file name [message #647389 is a reply to message #647362] Wed, 05 January 2011 22:12 Go to previous message
Jake is currently offline JakeFriend
Messages: 21
Registered: November 2010
Junior Member
Il 05/01/11 19:48, Alexander Nittka ha scritto:
> Hi,
>
>> I have the linking mechanism working, but how can I do to have the same
>> for the file?
> Do you mean "jumping to the file" on pressing F3 on the file name? By
> default this is implemented for cross references only. Your starting
> point would be the HyperlinkHelper. You might be able to find a couple
> of threads in this forum.
>
> Alex
thank you very much! I look in the Domain Model example
(../UI/Navigation/DomainmodelHyperlinkHelper) and I add this:

public Class<? extends IHyperlinkHelper> bindIHyperlinkHelper() {
return DomainmodelHyperlinkHelper.class;
}

in my ...UiModule.java

Jake
Previous Topic:Invalidate Model on external changes
Next Topic:Where is toString method of good old oAW 4
Goto Forum:
  


Current Time: Fri Apr 26 16:39:02 GMT 2024

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

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

Back to the top