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

Bug 320736

Summary: [All Diagram] Destroy views for the inherited contents when we destroy a Generalization
Product: [Modeling] Papyrus Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: CoreAssignee: Vincent Lorenzo <vincent.lorenzo>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Vincent Lorenzo CLA 2010-07-23 11:24:25 EDT
with the bug 319238, we can see inherited contents in Classifiers. If the Generalization is destroyed, we need to destroy the views corresponding to these inherited contents in the subclasses. Currently, I have created an Helper in the common which provides the command to destroy these Views.

Currently, the Class Diagram uses this helper to destroy views. A such action should be generalized in all diagrams.
Maybe it could be interesting to insert this code in the templates in order to avoid add this action in the custom source.
Comment 1 Patrick Tessier CLA 2010-08-16 10:00:01 EDT
Created attachment 176675 [details]
mylyn/context/zip

impacted classes
Comment 2 Patrick Tessier CLA 2010-08-16 10:00:43 EDT
In the generalizationhelper the code classifierEP.add(DiagramEditPartsUtil.getEditPartFromView((View)currentView, diagramEP)); can return null.
So it is important to test it in order to avoid NPE.

I have added test in the GeneralizationHelper
Comment 3 Vincent Lorenzo CLA 2013-03-13 06:53:35 EDT
This bug can be marked as closed fixed.