Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » ClassCastException & JobReconcilier
ClassCastException & JobReconcilier [message #1125503] Fri, 04 October 2013 15:32 Go to next message
vincent lorenzo is currently offline vincent lorenzoFriend
Messages: 132
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi everybody,
I'm working with the new Papyrus Xtext integration, with celleditor developped for the ModelExplorer, but in my case, I open them in the Papyrus nattable integration.

I manage myself the string error (without using alf).
I'm working with Kepler, using the Xtext integration done for Luna (Xtext 2.4.2).

I get this error when the typed string is not valid, any ideas?


java.lang.ClassCastException: org.eclipse.xtext.nodemodel.impl.LeafNode cannot be cast to org.eclipse.xtext.nodemodel.impl.CompositeNode
	at org.eclipse.xtext.nodemodel.impl.NodeModelBuilder.replaceAndTransferLookAhead(NodeModelBuilder.java:338)
	at org.eclipse.xtext.parser.impl.PartialParsingHelper.reparse(PartialParsingHelper.java:168)
	at org.eclipse.xtext.parser.antlr.AbstractAntlrParser.doReparse(AbstractAntlrParser.java:136)
	at org.eclipse.xtext.parser.AbstractParser.reparse(AbstractParser.java:48)
	at org.eclipse.xtext.resource.XtextResource.update(XtextResource.java:220)
	at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.doReconcile(XtextDocumentReconcileStrategy.java:125)
	at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:55)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.doRun(XtextReconciler.java:329)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.access$3(XtextReconciler.java:316)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:273)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:1)
	at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:36)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.modify(AbstractReadWriteAcces.java:81)
	at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:201)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:98)
	at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:270)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Re: ClassCastException & JobReconcilier [message #1137363 is a reply to message #1125503] Mon, 14 October 2013 12:44 Go to previous messageGo to next message
vincent lorenzo is currently offline vincent lorenzoFriend
Messages: 132
Registered: June 2010
Location: Paris Saclay, France
Senior Member
I tested on Luna and I get the same problem.
This small grammar provides the exception too :

// automatically generated by Xtext
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.papyrus.uml.alf.Common

import "http://www.eclipse.org/uml2/4.0.0/UML" as uml
import "http://www.eclipse.org/emf/2002/Ecore" as ecore

import "http://www.eclipse.org/uml2/4.0.0/Types" as types

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"


ConnectorEndRule:
	path= [uml::Property] ;
Re: ClassCastException & JobReconcilier [message #1137370 is a reply to message #1137363] Mon, 14 October 2013 12:48 Go to previous messageGo to next message
vincent lorenzo is currently offline vincent lorenzoFriend
Messages: 132
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Replacing
ConnectorEndRule:
	path= [uml::Property] ;


by
ConnectorEndRule:
	Rule;
Rule:
	path= [uml::Property] ;


the exception disapears.
Do I write a root rule doing nothing to use Xtext?
Re: ClassCastException & JobReconcilier [message #1137377 is a reply to message #1137370] Mon, 14 October 2013 12:54 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13493
Registered: July 2009
Senior Member
can you please file a ticket.

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Disappearing arguments? (Outline)
Next Topic:multiple line string terminal in xtext
Goto Forum:
  


Current Time: Fri Jul 10 20:29:36 GMT 2020

Powered by FUDForum. Page generated in 0.02206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top