Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Clipboard copy / past off popup menu
Clipboard copy / past off popup menu [message #1824264] Sat, 11 April 2020 12:22 Go to next message
George Aroush is currently offline George AroushFriend
Messages: 2
Registered: April 2020
Junior Member
Hi everyone,

This is my first post and I'm not sure if I'm posting to the right form / mailing list.

I inherited a plugin development project and I'm learning my way through the code and Eclipse plugin development. So if my question is not and use of terms is not clear let me know.

Our application uses IClipboardSupportFactory to take care of copy / past that are on the menu-bar. We also have code that provides copy / past function off a popup menu. This code is NOT invoking the same copy / past that code that gets used from the menu-bar copy / past, i.e. IClipboardSupportFactory. Instead, it is using our own class that inherits from GlobalAction and it has a different logic for copy / past which is only copying and pasting the UI elements not the underlying metadata of our application associated with the UI elements.

My question to the group is this, when I create my popup-menu how do I add to IMenuManager the copy / past handlers of IClipboardSupportFactory? If I can do this, then a copy / past action from the popup-menu's copy / past selection will do the right thing.

Btw, using the short-cut keys of Ctrl-C / Ctrl-V is working. They invoke the copy / past handler off IClipboardSupportFactory.

Thanks,

-- George
Re: Clipboard copy / past off popup menu [message #1824278 is a reply to message #1824264] Sun, 12 April 2020 09:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31227
Registered: July 2009
Senior Member
The only IClipboardSupportFactory I could find was this:

https://git.eclipse.org/c/gmf-runtime/org.eclipse.gmf-runtime.git/tree/org.eclipse.gmf.runtime.emf.clipboard.core/src/org/eclipse/gmf/runtime/emf/clipboard/core/IClipboardSupportFactory.java

But that's from GMF and how to use that is not the expertise of the folks developing the platform. It doesn't look like the GMF forum is very helpful so sending you there probably won't help:

https://www.eclipse.org/forums/index.php/f/16/

Perhaps GMF is using a class derived from EMF and this menuAboutToShow method is being called:

https://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/plugins/org.eclipse.emf.edit.ui/src/org/eclipse/emf/edit/ui/action/EditingDomainActionBarContributor.java#n614

You'll need to debug how the actions are being added and which ones are being added.
Previous Topic:Eclipse : Unicode support in JAVA Method / Block comments
Next Topic:Populating choose list performance: Windows vs. LInux
Goto Forum:
  


Current Time: Fri Jul 03 20:03:04 GMT 2020

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

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

Back to the top