Hover on keywords in nested structure does not seem to work [message #1839898] |
Wed, 31 March 2021 12:13 |
Jan Jansen Messages: 17 Registered: October 2018 |
Junior Member |
|
|
I managed to get hovers on keywords working following this tutorial: https://blogs.itemis.com/en/xtext-usability-hovers-on-keywords with a few additional changes since we do not make use of xbase classes.
One example of one of our models would look like the following:
keyword_a asdf {
keyword_b {
keyword_c {
keyword_d {
}
}
}
}
The hover implementation from the previously mentioned blog post only works for us until keyword_b. When hovering over keyword_c or keyword_d is not triggered, it does not call the hoverText() method:
def hoverText(Keyword k) {
val result = switch (k) {
case keyword_a: HoverTexts.KEYWORD_A
case keyword_b: HoverTexts.KEYWORD_B
case keyword_c: HoverTexts.KEYWORD_C
case keyword_d: HoverTexts.KEYWORD_D
}
return result
}
I've looked through the previous topics regarding hover texts using the search functionality, but I did not encounter anything similar to this issue unfortunately. If anyone could shed some light on the issue that would be fantastic!
[Updated on: Wed, 31 March 2021 12:14] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02994 seconds