Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/hover/RoomEObjectHover.xtend')
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/hover/RoomEObjectHover.xtend3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/hover/RoomEObjectHover.xtend b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/hover/RoomEObjectHover.xtend
index 8043af85f..68570d762 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/hover/RoomEObjectHover.xtend
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/hover/RoomEObjectHover.xtend
@@ -32,11 +32,12 @@ class RoomEObjectHover extends KeywordEObjectTextHover {
RoomGrammarAccess grammar
override protected getXtextElementAt(XtextResource resource, int offset) {
- // lookup expression
+
val parseResult = resource.parseResult
if(parseResult !== null) {
val leafNode = NodeModelUtils.findLeafNodeAtOffset(parseResult.rootNode, offset)
if(leafNode?.grammarElement instanceof RuleCall) {
+ // lookup model element in DetailCode
if((leafNode.grammarElement as RuleCall).rule == grammar.CC_STRINGRule && leafNode.semanticElement instanceof DetailCode){
val exprFeature = UIExpressionUtil.findAtOffset(leafNode, offset)
if(exprFeature?.data instanceof EObject)

Back to the top