Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 409933 - [General] [Diagram] Rewrite GMF Actions from Edit menu in the Diagram
Summary: [General] [Diagram] Rewrite GMF Actions from Edit menu in the Diagram
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.10.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.10.0   Edit
Assignee: Vincent Lorenzo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 409960
Blocks: 330181
  Show dependency tree
 
Reported: 2013-06-05 05:11 EDT by Vincent Lorenzo CLA
Modified: 2013-07-16 08:28 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 Vincent Lorenzo CLA 2013-06-05 05:11:16 EDT
The menu Edit displayed in the popup of the Diagram has not yet been rewritten according to Eclipse standard. 
Currently this menu is created and filled by GMF for Undo, Redo, Cut, Copy, Paste (that's why the shorcuts (CTRL + X, ...)  are not displayed in the menu. 
Moreover Papyrus adds the actions Clean Diagram and Paste With with Model in this menu, using the deprecated extension point org.eclipse.ui.popupmenu. 

We must rewrite this menu, as it has already been done for all others GMF actions.
Comment 1 Vincent Lorenzo CLA 2013-06-05 05:13:23 EDT
R11337 : share the new plugin oep.infra.gmfdiag.menu. This plugin will regroups the actions for Diagram.
Comment 2 Vincent Lorenzo CLA 2013-06-05 09:38:17 EDT
R11340, in oep.infra.gmfdiag.common : 
	- add a property tester for Diagram editor
	- add a method in DiagramEditPartUtils
Comment 3 Vincent Lorenzo CLA 2013-06-05 09:45:36 EDT
R11341 : commit Cut/Copy/Paste action for papyrus (in plugin oep.infra.gmfdiag.menu)
Comment 4 Vincent Lorenzo CLA 2013-06-05 09:54:42 EDT
R11343 : Rewrite CleanDiagramHandler and PasteWithModelHandler
These actions have been rewritten in oep.uml.diagram.menu (initially they were located in oep.uml.diagram.common)
Comment 5 Vincent Lorenzo CLA 2013-06-05 10:35:13 EDT
R11344 : rewrite the action "select element with the same type"
	-> move its code into oep.infra.gmfdiag.menu
Comment 6 Vincent Lorenzo CLA 2013-06-06 09:15:01 EDT
In R11355

Remove the gmf contributions which are now duplicated.
in oep.infra.gmfdiag.menu
	-> in the plugin.xml : defines the binding M1+M3+ALT for select elements with the same type
	
in oep.infra.gmfdiag.gmfmenu.filter 
	-> hide the gmf contribution to cut/copy/paste

in oep.uml.diagram.common
	-> in the plugin.xml : remove the contributions for PasteWithModelCommand and CleanDiagram
	-> in the source code : destroy the classes : 
			PasteWithModelAction
			CleanDiagram
			
in oep.uml.diagram.menu : 
	-> in the plugin.properties : remove the string &Select elements with same type
	-> in the plugin.xml : remove all contributions for Select By Type
	-> in the source code : destroy the classes : 
			AbstractMenuContributionItemProvider
			PolicyClass
			SelectByTypeHandler
			SelectByTypePropertyTester
			SelectionContributionItemProvider
			SelectTypeAction
Comment 7 Vincent Lorenzo CLA 2013-06-06 09:16:06 EDT
Unfortunately the Undo/Redo actions are always in the gmf editMenu... I don't know how to remove them (see post http://www.eclipse.org/forums/index.php/m/1062180/#msg_1062180 ) 

We can't close this bug.