Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320736 - [All Diagram] Destroy views for the inherited contents when we destroy a Generalization
Summary: [All Diagram] Destroy views for the inherited contents when we destroy a Gene...
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Vincent Lorenzo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 11:24 EDT by Vincent Lorenzo CLA
Modified: 2013-03-13 06:53 EDT (History)
0 users

See Also:


Attachments
mylyn/context/zip (805 bytes, application/octet-stream)
2010-08-16 10:00 EDT, Patrick Tessier CLA
no flags Details

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