Bug 238897 - [Actions] Shouldn't contribute "Delete from Model" action to context menu
Summary: [Actions] Shouldn't contribute "Delete from Model" action to context menu
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 minor
Target Milestone: ---   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-28 20:22 EDT by Alex Boyko CLA
Modified: 2008-06-28 20:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Boyko CLA 2008-06-28 20:22:09 EDT
Look into the possibility of not contributing "Delete from Model" action into context menu.
org.eclipse.gmf.runtime.diagram.ui.providers/plugin.xml
contributionItemProviders extension contributes various actions to diagram context menu. One of these actions is the delete from model action.
Delete from model action is contributed based on "method" criteria.
The method is being called for object in the selection. Currently the criteria method is getNotationView().getElement() and it's returned value != null. This means that we don't try to resolve semantic element and, hence, get the action contributed to popup menu for editparts with not resolvable semantic elements.
(There is no pluginID and class name provided for the method, therefore, the method is considered to be an instance method on the editpart.)
To be able to fix this, we need to call ViewUtil#resolveSemanticElement(View view) method, so provide ViewUtil class plugin id, then the class and the method as described in the extension point documentation. The method needs a parameter our editpart. We need to investigate what's the proper way to supply our editpart as a parameter for the static method in the extension point. (This is described in the extension point description).
Comment 1 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug