Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » navigable reference to non-model file without xbase
navigable reference to non-model file without xbase [message #1735032] Tue, 14 June 2016 19:30 Go to next message
Johannes Beichter is currently offline Johannes BeichterFriend
Messages: 5
Registered: November 2011
Junior Member
Hi,

with the advice from [1] I managed to reference files by their filename
and get a navigable link in my DSL files to open these referenced files
in another editor.

My problem is that I can't base my grammar on common.Terminals because
this solution builds on overriding bindIHyperlinkHelper() in
DefaultXbaseUiModule, which I only get when basing my grammar on xbase.

Can you give any recommendations how to implement the same behaviour
with common.Terminals? I have created a stripped down demo in [2].

Thanks for any suggestions.

[1] https://www.eclipse.org/forums/index.php/t/202606/
[2]
https://github.com/bassjoe/xtext-reference-file/tree/413e81c2e6ea75a8620941f7fb36055c1415fb23
Re: navigable reference to non-model file without xbase [message #1735033 is a reply to message #1735032] Tue, 14 June 2016 19:33 Go to previous messageGo to next message
Johannes Beichter is currently offline Johannes BeichterFriend
Messages: 5
Registered: November 2011
Junior Member
The most interesting files are here btw:
https://github.com/bassjoe/xtext-reference-file/tree/413e81c2e6ea75a8620941f7fb36055c1415fb23/org.xtext.example.mydsl.ui/src/org/xtext/example/mydsl/ui
Re: navigable reference to non-model file without xbase [message #1735036 is a reply to message #1735033] Tue, 14 June 2016 19:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Looks Iike there is a basic misunderstanding. You can add any binding to your guice modules following the conversations mentioned in the docs. http://www.eclipse.org/Xtext/documentation/302_configuration.html#dependency-injection
The override is only necessary if the base module already has a binding

def Class<? extends IHyperlinkHelper> bindIHyperlinkHelper() {
return typeof(CustomizedDomainmodelHyperlinkHelper)
}

In your case even the superclass being typesawarehyperlinkhelper seems not necessary


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: navigable reference to non-model file without xbase [message #1735140 is a reply to message #1735036] Wed, 15 June 2016 18:32 Go to previous message
Johannes Beichter is currently offline Johannes BeichterFriend
Messages: 5
Registered: November 2011
Junior Member
Thanks a lot for your hints! Now the editor works exactly as expected.
Previous Topic:The seven languages text
Next Topic:Best practice for checking URI equality
Goto Forum:
  


Current Time: Sat Nov 09 02:09:23 GMT 2024

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

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

Back to the top