You use the API addSelectionListener(SelectionListener)
. If you say the action is wrapper, then you delegate methods if needed.
You are aware of the action selection with the getSelection()
method.
문제
In my Eclipse RCP project, I create a JFace Action and then add it to my Form's ToolBarManager. What is the correct mechanism for my Form to be notified of the Action's activation? The Action itself is self-contained and performs what it needs to perform. But as a side-effect I'd also like the Form to be able to react, something like an 'onButtonClicked' callback.
해결책
You use the API addSelectionListener(SelectionListener)
. If you say the action is wrapper, then you delegate methods if needed.
You are aware of the action selection with the getSelection()
method.