Abhishek Choudhary
Abhishek Choudhary

Reputation: 8395

How to remove or set help content to the Help menu available in WizardDialog in eclipse plugin

I am calling WizardDialog dialog = new WizardDialog and a new window is opening with a help icon in the bottom button tray in extreme left corner. I don't need that button. How to remove that or is there any way to add help content to it.

Upvotes: 2

Views: 556

Answers (1)

VonC
VonC

Reputation: 1324547

According to bug 330206:

To hide the "?" you need to call setHelpAvailable(false) on your WizardDialog.
If you don't control/create the dialog, you can add the following method to your wizard:

public void setContainer(IWizardContainer wizardContainer) {
    super.setContainer(wizardContainer);
    if (getContainer() instanceof TrayDialog)
        ((TrayDialog)getContainer()).setHelpAvailable(false);

}

To add Help, you can see the general idea in this thread, but take into account bug 3827:

if you are opening the wizard in a WizardDialog you create, you have to set help on the dialog's shell: ex.

dialog.create();
WorkbenchHelp.setHelp(dialog.getShell(), new Object[]{IHelpContextIds.NEW_WIZARD});
dialog.open();

Upvotes: 1

Related Questions