You can run jface actions from the welcome page like this (in the introContent.xml
)
<link
label="System Configuration"
url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.ui.internal&class=org.eclipse.ui.internal.OpenPreferencesAction">
<img src="config.png" alt="System Configuration"/>
<text>Current system configuration.</text>
</link>
if your intro page is in XHTML. The encoded ampersand &
is quite a common pitfall. You can also call your own implemented action class (not a predefined one from org.eclipse.ui.*
), but you should then implement the IIntroAction
like this
public class YourPreferencesAction extends OpenPreferencesAction implements IIntroAction {
@Override
public void run(IIntroSite site, Properties params) {
final IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
run();
}
}
where you close the intro page and call some method you would like to have executed, in this case run()
. Your actions class should in all cases inherit from org.eclipse.jface.Action
.