Launch an action in Eclipse RCP at startup

六眼飞鱼酱① 提交于 2019-11-30 04:11:21

问题


I have an RCP plug-in and I have configured the help system to run within this plug-in. I can access it from the Help menu.

Now I want to launch the "Dynamic Help" action by default at startup. How do I do this?


回答1:


Solved this by using the WorkbenchAdvisor implementation:

@Override
public void postStartup() {
    IWorkbenchHelpSystem help = PlatformUI.getWorkbench().getHelpSystem();
    help.displayDynamicHelp();
}

The Startup extension proved futile.




回答2:


You could use the org.eclipse.ui.startup extension and implement the org.eclipse.ui.IStartup interface that allows you to run code once the workbench has initialized.



来源:https://stackoverflow.com/questions/2220586/launch-an-action-in-eclipse-rcp-at-startup

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!