リターゲット可能なアクション
<action id="mytest.action1" definitionId="mytest.open" label="Open" retarget="true" menubarPath="navigate/open.ext" allowLabelUpdate="true" > </action>
リターゲット可能なアクションは、ソース中でdefinitionIdを指定して、アクションを再指定可能。エディターのアクションなどだと、EditorのcontributorClassなどで再ターゲットするといいみたい。
public class HogeContrib extends EditorActionBarContributor { private JumpAction action; public HogeContrib() { action = new JumpAction(); } public void init(IActionBars bars, IWorkbenchPage page) { super.init(bars, page); bars.setGlobalActionHandler("mytest.action1", action); } public void setActiveEditor(IEditorPart editor) { super.setActiveEditor(editor); action.setActiveEditor(editor); } public void contributeToMenu(IMenuManager menuManager) { super.contributeToMenu(menuManager); } }