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

Bug 343641

Summary: [General] "Restore related elements" action on Class Diagram, Activity Diagram and Parametric Diagram poluating other GMF editors
Product: [Modeling] Papyrus Reporter: Arthur Daussy <arthur.daussy>
Component: CoreAssignee: Vincent Hémery <vincent.hemery>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: gonzague.reydet, raphael.faudou, vincent.hemery
Version: 0.8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Arthur Daussy CLA 2011-04-22 04:32:32 EDT
Build Identifier: 

Papyrus version : 0.8.0 v 201103300538 (on the trunk)

The scope of org.eclipse.papyrus.sysml.diagram.parametric.providers.ParametricDiagramContributionItemProvider is not limited to current diagram it implies that the action is available in all diagram. Moreover in all other editor you can get a Null Pointer Exception because the method org.eclipse.papyrus.sysml.diagram.parametric.actions.RestoreRelatedLinksAction.isEnabled() is not safe. This is also in the Class Diagram and in the Activity Diagram.

Reproducible: Always

Steps to Reproduce:
1. Create a diagram with another GMF editor
2. Right click on a new IGraphicalEditPart
3. Choose Navigate
4. Select "Restore Related Element"
Comment 1 Vincent Hémery CLA 2011-04-22 09:55:59 EDT
*** Bug 343149 has been marked as a duplicate of this bug. ***
Comment 2 Arthur Daussy CLA 2011-09-29 03:44:50 EDT
*** Bug 316548 has been marked as a duplicate of this bug. ***
Comment 3 Arthur Daussy CLA 2011-09-29 05:35:05 EDT
The correction has been committed on the trunk and branch 0.8.X.

Note: There is a polluting contribution in the contextual menu by an EcoreTool contribution. Normally the bug has been corrected on the trunk of Ecore Tools. So this problem should resolved by it self.
If in the following released the bug is not corrected a class policy has to be added in the plugin org.eclipse.emf.ecoretools.diagram and referenced in the org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders extension. This class will have to constrain the contribution to the EcoreTools Editor.

This bug has to be monitored and correct if needed.