Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326360

Summary: [Diagram] Conversion to association and association class sometimes fails
Product: [Technology] Tigerstripe Reporter: Navid Mehregani <nmehrega>
Component: UIAssignee: Navid Mehregani <nmehrega>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chrhartl, yuri
Version: unspecified   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
diagram
none
326360 patch none

Description Navid Mehregani CLA 2010-09-27 18:29:58 EDT
Build Identifier: 

Conversion to Association and Association Class makes the incorrect assumption that the association ends are always managed entities.  This results in the indicated ClassCastException:


java.lang.ClassCastException: org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.edit.parts.SessionFacadeArtifactEditPart cannot be cast to org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.edit.parts.ManagedEntityArtifactEditPart
at org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.part.AbstractConverter.run(AbstractConverter.java:122)
at org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.part.ConvertAssociationToAssociationClass.run(ConvertAssociationToAssociationClass.java:18)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

Reproducible: Always

Steps to Reproduce:
1. Create an association between two session artifacts
2. Convert the Association to an Association Class by right clicking on it in diagram view.  Look at Error log.
Comment 1 Chris Hartley CLA 2010-09-27 23:07:04 EDT
Don't affect that we also allow associations (and I assume association classes) to association classes
Comment 2 Chris Hartley CLA 2010-09-27 23:11:11 EDT
Created attachment 179703 [details]
diagram

possible association class usage, but not probable
Comment 3 Anton Salnik CLA 2011-01-20 06:05:46 EST
Created attachment 187174 [details]
326360 patch
Comment 4 Yuri Strot CLA 2011-01-24 04:11:02 EST
Anton's patch applied.
Comment 5 Navid Mehregani CLA 2011-01-24 12:36:35 EST
Verified. Thanks!