xtext: java.lang.ClassCastException: LeafNode cannot be cast to CompositeNode
Just hit the following exception while editing an *.xtend file:

org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy - Parsing in reconciler failed.
java.lang.ClassCastException: org.eclipse.xtext.nodemodel.impl.LeafNode cannot be cast to org.eclipse.xtext.nodemodel.impl.CompositeNode
at org.eclipse.xtext.xbase.parser.LookAheadPreservingNodeModelBuilder.replaceAndTransferLookAhead(LookAheadPreservingNodeModelBuilder.java:41)
at org.eclipse.xtext.xbase.parser.TokenSequencePreservingPartialParsingHelper.reparse(TokenSequencePreservingPartialParsingHelper.java:127)
at org.eclipse.xtext.parser.antlr.AbstractAntlrParser.doReparse(AbstractAntlrParser.java:139)
at org.eclipse.xtext.parser.AbstractParser.reparse(AbstractParser.java:51)
at org.eclipse.xtext.resource.XtextResource.update(XtextResource.java:266)
at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.doReconcile(XtextDocumentReconcileStrategy.java:183)
at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:91)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.doRun(XtextReconciler.java:457)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.access$3(XtextReconciler.java:437)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:371)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:1)
at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:38)
at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:70)
at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:432)
at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:165)
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:368)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Versions:
Xtext SDK: 2.23.0.v20200608-0122
Xtend IDE: 2.23.0.v20200608-0122
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 17 (15 by maintainers)
Thanks @miklossy, this allows to reproduce the exception.