Reputation: 863
I have a class that implements ISelectionListener. I want to determine when the user right clicked when the selection was made.
This is the method that I need to implement to handle selection changes:
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
//HOW?
// if right clicked... do something
// else .. do default
}
Upvotes: 0
Views: 877
Reputation: 328556
The selection event doesn't have the information you need but you can register a mouse listener, and set an internal flag when the right button is pressed and clear the flag when it is released. In your selection listener, you can then check this flag.
Upvotes: 1