I'm creating an RCP application and wanted to provide documentation using the Eclipse Help Contents (Help > Help Contents), I managed to add some pages to it by using the extension point org.eclipse.help.toc, this works fine, but I'm interested in providing a link in one of those pages to launch a wizard, I found that Eclipse provides support for this using a feature called Active Help.
First, in my html Help page I have imported the livehelp.js script:
<head>
...
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<head>
Then in the <body> I added a link:
<a href='javascript:liveAction("com.test.my.plugin", "com.test.my.plugin.actions.TestAction", "")'>Execute action</a>
And finally, this my TestAction class:
public class TestAction implements ILiveHelpAction {
@Override
public void run() {
System.out.println("Action executed");
// code to launch wizard is here
}
@Override
public void setInitializationString(String str) {
}
}
But when the link is clicked the action is not executed, I tried setting a breakpoint in the run() method but it is never called, any idea why this is happening?