Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to hook widgets in editor to global cut/copy/paste?
How to hook widgets in editor to global cut/copy/paste? [message #635165] Mon, 25 October 2010 20:09 Go to next message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
I've got an editor that uses the FormsAPI for the contents of the editor. It's a single page editor, but uses a master/details setup, similar to the extensions page of the PDE editor. I'd like to link the jFace viewers, text boxes, etc. to the global cut/copy/paste, but am unsure how to do it. I've looked through the PDE code, and ended up fairly confused as to how they do it (seems like somehow each field is linked to a canCopy(), canPaste(), etc.). Any tips or examples on how this would be done? It seems like you'd want to link the control with the global actions when the control gets focus, but again, I'm not sure the best way to do that.

Thanks,
Ryan
Re: How to hook widgets in editor to global cut/copy/paste? [message #635340 is a reply to message #635165] Tue, 26 October 2010 13:44 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If you have Controls, see the javadoc for
org.eclipse.ui.swt.IFocusService. You can register specific copy/paste
handlers for individual controls.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:any widget for file viewing?
Next Topic:strange index update with virtual table
Goto Forum:
  


Current Time: Thu Apr 25 13:53:08 GMT 2024

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

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

Back to the top