문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top