Hover information support in Xtext Web editor [message #1808669] |
Fri, 28 June 2019 08:51  |
Eclipse User |
|
|
|
Dear Xtext experts,
At first thanks a lot for such an awesome technology and tools built around it!
We are planning to use Xtext technology for building custom DSL. It has to contain set of predefined functions that will utilise boolean logic comparison, addition negation of its results.
We are using Orion web editor as a target UI component for end-user usage.
So as an example in web-editor moderator has to type smth like this:
if (func1("stringParam1") AND func2(10)) {
if (func3("stringParam3") <= 7 OR func4(42) = "SomeValueForComparsion") {
return true
}
}
return false
As a part of our requirements we have to implement hover functionality in order to provide the information for the end-user let's say about function
func1("stringParam1"). As I read from the Xtext documentation it should work with help of 'IEObjectDocumentationProvider' (https://www.eclipse.org/Xtext/documentation/330_web_support.html#hover-info) and I've put some ML_COMMENT's into MyDSLGrammar.xtext files but looks like it doesn't work for me for some reason. I've tried to debug 'org.eclipse.xtext.documentation.impl.MultiLineCommentDocumentationProvider' that is an actuial the implementer of IEObjectDocumentationProvider interface but it always leaves the function at
if (!leafNode.isHidden())
break;
condition and never adds any documentation. I've attached the screenshot to make it clear what I want to achieve (in short I want to add some documentation for the func2: `func2 does blabla`)
Do you have any hints for me on how I should implement it in a proper way ?
Thanks in advance, Dima.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03247 seconds