Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » classcast exception in mindmap tutorial part 2
classcast exception in mindmap tutorial part 2 [message #208204] Thu, 09 October 2008 20:51
Juergen Aschenbrenner is currently offline Juergen AschenbrennerFriend
Messages: 25
Registered: July 2009
Junior Member
Hi all,

I have been digging through the gmf tutorial and got stuck at the point
where to generate threads and items and run them.

Somehow inconsistent code is generated for ThreadSubjectEditPart I cant
figure out what caused it:

/**
* @generated
*/
protected IFigure createFigurePrim() {
return new StickyNoteFigure();
}

/**
* @generated
*/
protected String getLabelTextHelper(IFigure figure) {
if (figure instanceof WrappingLabel) {
return ((WrappingLabel) figure).getText();
} else {
return ((Label) figure).getText();
}
}

This code causes the following exception:

java.lang.ClassCastException:
org.eclipse.gmf.examples.mindmap.diagram.edit.parts.ThreadSu bjectEditPart$StickyNoteFigure

cannot be cast to org.eclipse.draw2d.Label
at
org.eclipse.gmf.examples.mindmap.diagram.edit.parts.ThreadSu bjectEditPart.getLabelTextHelper(ThreadSubjectEditPart.java: 147)
at
org.eclipse.gmf.examples.mindmap.diagram.edit.parts.ThreadSu bjectEditPart.createFigure(ThreadSubjectEditPart.java:588)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.getFigur e(AbstractGraphicalEditPart.java:452)
....

Can someone give me a hint where to look to fix this. I feel I did
everything according the tutorial.?!

Thanks in advance and keep up the goog work!

Jürgen
Previous Topic:Multiple Column
Next Topic:About outline view problem
Goto Forum:
  


Current Time: Fri Apr 19 04:40:54 GMT 2024

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

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

Back to the top