Launch an action in Eclipse RCP at startup

2019-02-13 09:29发布

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?

2条回答
走好不送
2楼-- · 2019-02-13 10:03

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.

查看更多
对你真心纯属浪费
3楼-- · 2019-02-13 10:27

Solved this by using the WorkbenchAdvisor implementation:

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

The Startup extension proved futile.

查看更多
登录 后发表回答