Creating hyperlinks in Xtext editor [message #648711] |
Fri, 14 January 2011 02:51  |
Eclipse User |
|
|
|
I have an Xtext Editor for my DSL. Let's say one of the construct supported in my DSL has the following syntax: <var_name> = func_name(datasheet{x=y}{z}, arg1, arg2). An example would be a = foo(data{dff=sel}{pin}, b, c).
data{dff=sel}{pin} happens to be a datasheet in an Excel workbook. Let's say this datasheet is in a file called foo_data.xls
In my Xtext editor, I want to create a hyperlink on the word 'data' so that if the user double clicks 'data', I can open up 'foo_data.xls' in an Excel editor. I'm not sure how to create such a hyperlink. Or maybe I want to open up web browser (firefox), and supply a URL for foo_data.xls. Does anyone have any suggestions on how to create the hyperlink on 'data'? Not sure what interfaces I will have to implement.
I read the documentation on Xtext hyperlinking, but it seemed like it was more for linking/cross-referencing to other parts of the Xtext document. I'm not sure that is applicable here.
Thank you for any ideas.
|
|
|
|
|
|
|
Re: Creating hyperlinks in Xtext editor [message #1782103 is a reply to message #1782097] |
Sat, 17 February 2018 13:11  |
Eclipse User |
|
|
|
hi,
which dependencies are you talking about?
MyDslUiModule.xtend is in src and you should create your MyCustomHyperlinkHelper there too.
the xtend syntax for the binding is
override Class<? extends IHyperlinkHelper> bindIHyperlinkHelper() { return MyCustomHyperlinkHelper; }
[Updated on: Sat, 17 February 2018 13:14] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.49753 seconds