Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:53
Lior Missing name is currently offline Lior Missing nameFriend
Messages: 18
Registered: February 2011
Junior Member
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 Apr 26 21:12:38 GMT 2024

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

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

Back to the top