Custom Plug-in - Capture the Mouse Right Click popup menu selection [message #1835870] |
Tue, 15 December 2020 14:27 |
Jayaseelan Gabriel Messages: 1 Registered: December 2020 |
Junior Member |
|
|
Dear All,
Recently I have developed a plugin for education purpose. The main functionality of this plug-in is capture the copy & paste action in the editor.
I have used ICommandService class to capture the copy & paste event. It is working successfully in Keyboard shortcuts ( Cntl+V) and eclipse main menu ( Edit--> Paste)
But same is not working while using Mouse Right Click -> Popup Menu -> Paste.
Is there any way to capture the Mouse Popup Menu Selection.
I am using following code to capture the Paste event.
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
Command defaultCopyCommand = commandService.getCommand(org.eclipse.ui.IWorkbenchCommandConstants.EDIT_COPY);
Command defaultPasteCommand = commandService.getCommand(org.eclipse.ui.IWorkbenchCommandConstants.EDIT_PASTE);
defaultCopyCommand.addExecutionListener(iel);
defaultPasteCommand.addExecutionListener(iel);
Thanks in Advance.
|
|
|
Powered by
FUDForum. Page generated in 0.09502 seconds