Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343641 - [General] "Restore related elements" action on Class Diagram, Activity Diagram and Parametric Diagram poluating other GMF editors
Summary: [General] "Restore related elements" action on Class Diagram, Activity Diagra...
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Vincent Hémery CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 316548 343149 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-22 04:32 EDT by Arthur Daussy CLA
Modified: 2011-09-29 05:35 EDT (History)
3 users (show)

See Also:


Attachments

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