In eclipse, How to combine handler events and action of the actionSet
I am developing a plugin which contains popup menu (using the org.eclipse.ui.handlers extension) main menu item (using the org.eclipse.ui.actionSet extension). Therefore I had to implement both the execution method (Object execute(ExecutionEvent event)) and run method (void run(IAction action)). How do I combine those methods and implement only one execute method. My plugin xml is
Here's one way:
public Object execute(ExecutionEvent event) {
String parameter = event.getParameter("parameter-key");
combine(parameter);
return null;
}
public void run(IAction action) {
combine("");
}
protected void combine(String parameter) {
}
精彩评论