classcast exception in mindmap tutorial part 2 [message #208204] |
Thu, 09 October 2008 20:51 |
Juergen Aschenbrenner 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
|
|
|
Powered by
FUDForum. Page generated in 0.02245 seconds