Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Cross Reference to a file name
Cross Reference to a file name [message #647357] Wed, 05 January 2011 13:30 Go to next message
Eclipse UserFriend
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 13:48 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Cross Reference to a file name [message #647389 is a reply to message #647362] Wed, 05 January 2011 17:12 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 15:38:06 EDT 2025

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

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

Back to the top