Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326360 - [Diagram] Conversion to association and association class sometimes fails
Summary: [Diagram] Conversion to association and association class sometimes fails
Status: VERIFIED FIXED
Alias: None
Product: Tigerstripe
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 0.5M0   Edit
Assignee: Navid Mehregani CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-27 18:29 EDT by Navid Mehregani CLA
Modified: 2011-01-24 12:36 EST (History)
2 users (show)

See Also:


Attachments
diagram (11.52 KB, image/png)
2010-09-27 23:11 EDT, Chris Hartley CLA
no flags Details
326360 patch (3.17 KB, patch)
2011-01-20 06:05 EST, Anton Salnik CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!