Community
Participate
Working Groups
It would be very useful to dump a parsed tree when there are syntax errors (do debug what the parser actually did parse). This fails with an NPE with the stack trace of: java.lang.NullPointerException at org.eclipse.xtext.util.XtextSwitch.doSwitch(XtextSwitch.java:58) at org.eclipse.xtext.nodemodel.util.NodeModelUtils.compactDump(NodeModelUtils.java:281) at org.eclipse.xtext.nodemodel.util.NodeModelUtils.compactDump(NodeModelUtils.java:273) at org.eclipse.xtext.nodemodel.util.NodeModelUtils.compactDump(NodeModelUtils.java:273) (at the top). This is caused by node.getGrammarElement() being passed to XtextSwitch. There should be a guard there that produces a label like "error".
this is indeed annoying.
fixed in master. changes: - check if node.getGrammarElement() is null to avoid NPEs. - include syntax error messages into the dump if they exist.
Closing all bugs that were set to RESOLVED before Neon.0