4

I have implemented a Wizard and WizardPage. I noticed that it has a help button with question mark icon. I would like to open a browser internal/external with a static url(www.stackoverflow.com). I have tried a few things but I couldn't find what gets executed when the button is clicked.

  1. I have implemented the HelpListener on both WIZARD & WIZARDPAGE; but could not get the method to be invoked when I click on the button.

    public void helpRequested(HelpEvent e) { PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL("http://www.stackoverflow.com")); }

  2. In the WIZARD constructor I have setHelpAvailable(true); and it gives me the Help button with the text.

  3. I also tried the HandleEvent in the WIZARDPAGE with SWT.Help event type but again nothing happened.

I am not sure if & how I can add listener to this button? and How I could implement to open a browser by clicking on this button.

Please advice. Thanks in advance.

Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68
ravikanth
  • 151
  • 1
  • 10
  • Can't believe, this is exactly what I wanted. I spent at least 3 hours trying to resolve and could find the performHelp method that gets invoked when that button was clicked. Thank you so much! But yes it is a duplicate, pls let me know if i have to delete this question? I am not aware of the guideline. – ravikanth Dec 26 '13 at 14:48

1 Answers1

0

Each org.eclipse.jface.wizard.WizardPage can implement performHelp(), there you should be able to open a browser with your help.

flavio.donze
  • 7,432
  • 9
  • 58
  • 91