Community
Participate
Working Groups
The following exception is thrown when trying to create an Association Class on an already existing Association : java.lang.ClassCastException: org.eclipse.papyrus.diagram.clazz.edit.parts.AssociationEditPart cannot be cast to org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart at org.eclipse.papyrus.diagram.clazz.custom.helper.AssociationClassHelper.getAssociationClassElementCommand(AssociationClassHelper.java:251) at org.eclipse.papyrus.diagram.clazz.custom.policies.CustomGraphicalNodeEditPolicy.getCommand(CustomGraphicalNodeEditPolicy.java:60) at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:502) [...] There seems to be a confusion between GEF.GraphicalEditPart, GMF.IGraphicalEditPart and GMF.GraphicalEditPart, with unchecked, optimistic casts. However, it is still possible to create an association class directly from two classes. Steps to reproduce : - Create two classes - Create an association between these two classes - Create an association class on the association Workaround : - Create two classes - Create an association class between these two classes (Another exception is thrown, but this is another story, and this doesn't prevent the association class creation)
Fixed in the version 8556 if this not a graphical editpart unexecutableCommand is returned