From 9b43417e24baa7c59effc701ced410fc89749881 Mon Sep 17 00:00:00 2001 From: Moritz Eysholdt Date: Thu, 11 Aug 2016 14:59:00 +0200 Subject: [PATCH] make grammar GrammarElementTitleSwitch more robust Signed-off-by: Moritz Eysholdt --- .../xtext/grammaranalysis/impl/GrammarElementTitleSwitch.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.eclipse.xtext/src/org/eclipse/xtext/grammaranalysis/impl/GrammarElementTitleSwitch.java b/org.eclipse.xtext/src/org/eclipse/xtext/grammaranalysis/impl/GrammarElementTitleSwitch.java index 909e87e83..da29767d4 100644 --- a/org.eclipse.xtext/src/org/eclipse/xtext/grammaranalysis/impl/GrammarElementTitleSwitch.java +++ b/org.eclipse.xtext/src/org/eclipse/xtext/grammaranalysis/impl/GrammarElementTitleSwitch.java @@ -104,6 +104,8 @@ public class GrammarElementTitleSwitch extends XtextSwitch implements Fu if (!showQualified && !showRule) return result; AbstractRule rule = GrammarUtil.containingRule(ele); + if (rule == null) + return ":" + result; if (!showQualified) return result + ":" + rule.getName(); GrammarElementTitleSwitch others = copy();