Reputation: 4103
I found two ways to allegedly make the help work for an Eclipse wizard.
The first is to set setHelpAvailable(true)
on my instance of Wizard
and let the WizardPage
override the method:
public void performHelp() {
PlatformUI.getWorkbench().getHelpSystem().displayHelp(CONTEXT_ID);
}
It displays a help button without an icon next to the "Back" button, but the method performHelp
is never called.
The second way is to set it on the TrayDialog
directly like this:
WizardDialog dialog = new WizardDialog(myShell, myWizard);
dialog.create();
WorkbenchHelp.setHelp(dialog.getShell(), CONTEXT_ID);
dialog.setHelpAvailable(true);
dialog.open();
This displays a button with an icon on the bottom left, but nothing happens when I click it.
The help system is set up (quiet a feat with the documentation, if I say so myself), but I can't figure out how to get either of these solutions to work. And I wonder if one of them should preferred over the other?
Upvotes: 1
Views: 381
Reputation: 4103
Just for completeness sake: In my case the problem had nothing to do with the sparsely documented help feature, but with the fact that Eclipse Mars can't Hot Code Replace anymore.
Upvotes: -1
Reputation: 111142
With the WizardDialog
just call
dialog.setHelpAvailable(true);
In the createControl
method of each WizardPage
call the help system setHelp
:
public void createControl(Composite parent)
{
Composite composite = new Composite(parent, SWT.NONE);
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, "help id");
... other code
Upvotes: 2