java.lang.ClassCastException: LeafNode cannot be cast to CompositeNode

Open
#2,323 17 comments 0 reactions 1 assignee View on GitHub

@nbhusare is already working on this.

Since Oct 2, 2020.

Assessment

This issue has not been assessed yet.

Description

bug confirmed

Just hit the following exception while editing an *.xtend file:
screenshot

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

Dominant language
Java
Stars
831
Forks
330
Avg merge
3d 7h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-xtext/xtext

All issues in eclipse-xtext/xtext

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.