Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Correct way to handle copy/paste from a View into a GraphicalEditor
Correct way to handle copy/paste from a View into a GraphicalEditor [message #755915] Thu, 10 November 2011 02:53
Eclipse UserFriend
We're developing an application in which we handle local copy/pastes within the diagram by using the extension point
org.eclipse.gmf.runtime.emf.clipboard.core.clipboardSupport


Copy/Paste events of resources in views are handled using a handler with the commandId
org.eclipse.ui.edit.copy/paste


My question is , what's the correct way of handling copy/paste events between the diagram (or any GraphicalEditor for that matter) and other views in the application?

Currently, I was managed to solve it programatically, putting this code in the DiagramEditor initialization method:

IActionBars actionBars = site.getActionBars();
EditPartViewer diagramGraphicalViewer = getDiagramGraphicalViewer();
actionBars.setGlobalActionHandler(GEFActionConstants.PASTE, new PasteMethodNodeAction(clipboard,diagramGraphicalViewer));

But it overrides the other paste listeners of the Editor and generally interrupts our design.

Any ideas will be welcome Smile
Previous Topic:no live validation pop-up window in RCP generated product
Next Topic:How to install custom subclass of OpenEditPolicy for editpart in GMF
Goto Forum:
  


Current Time: Fri Nov 07 01:31:22 EST 2025

Powered by FUDForum. Page generated in 0.05278 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top