Xtext Cross References

I am working on an Xtext-based Eclipse plugin for the language we use internally. This language can take the form of a form:

run : /some/file/path/foo.txt 

... and ultimately I want to provide a custom location provider so that pressing F3 on the file path will open the file in a new editor in Eclipse. I have not had the opportunity to try this, but does anyone see something wrong with the following approach?

  • Override IHyperlinkHelper to make my file path rule cross-review
  • Override ILocationInFileProvider to make the file path rule do the magic of Eclipse to open the file in a new editor

Any tips are welcome, thanks

+7
source share
1 answer

The approach sounds good to me. You can also provide content help for paths by customizing the offer provider. A rule to validate a file link can also be useful.

+4
source

All Articles