Community
Participate
Working Groups
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).
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug