Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Cut/Copy/Paste functionality in GEF Eclipse(How to implement the Cut/Copy/Paste in GEF. )
Cut/Copy/Paste functionality in GEF Eclipse [message #1729944] Wed, 20 April 2016 12:16 Go to next message
Arpit Bhargava is currently offline Arpit BhargavaFriend
Messages: 2
Registered: April 2016
Junior Member
I tried to implement the cut/copy/paste in GEF using addGlobalActionKey and addRetargetAction in a class that extends ActionBarContributor.

protected void declareGlobalActionKeys() {
addGlobalActionKey(ActionFactory.SELECT_ALL.getId());
addGLobalActionKey(ActionFactory.CUT.getId());
addGlobalActionKey(ActionFactory.COPY.getId());
addGlobalActionKey(ActionFactory.PASTE.getId());
}


SelectAll is working perfectly fine, but Cut/Copy/Paste is not working at all. I am not able to copy the content to the clipboard also. I use copyTemplateAction and pasteTemplateAction to implement these functionality. Also these options are disabled in edit menu. I went through a lot of links but not able to come up with the functionality that will clearly display how to implement cut/copy/paste.

Please revert on this issue. Thanks



Re: Cut/Copy/Paste functionality in GEF Eclipse [message #1731886 is a reply to message #1729944] Tue, 10 May 2016 16:03 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 235
Registered: July 2009
Location: L√ľnen
Senior Member
You will have to add respective actions to the editor to which the retarget actions can delegate. Take a look into the LogicEditor of the logic example, where such actions are created within createActions().
Previous Topic:Problem migration from e3 to e4 - GEF and tabitem
Next Topic:Accessibility programming guide for Draw2D
Goto Forum:
  


Current Time: Tue Nov 20 00:57:20 GMT 2018

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

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

Back to the top