Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Providing Help in Preferences
Providing Help in Preferences [message #662792] Thu, 31 March 2011 19:42 Go to next message
Eclipse User
Originally posted by: spayne.s4isystems.com

Hello all!
I would like to provide help documentation for a couple preference pages
have in my RCP plugin. I managed to provide F1 help by using
PlatformUI.getWorkbench().getHelpSystem().setHelp(...) in the
createFieldEditors() method of my FieldEditorPreferencePage-derived
preference page class and it works when I press F1. However, the help
button is not displayed on the preferences dialog as it does in the
Eclipse IDE. From my understanding, since the one in the Eclipse IDE is
an internal class (WorkbenchPreferenceDialog, derived from
PreferenceDialog, derived from TrayDialog), in order for me to show the
little help button on only the preference dialog, I would have to do one
of two things:
1) Call TrayDialog.setDialogHelpAvailable(true), which would then show
the help icon on every dialog, or
2) Derive a custom dialog from WorkbenchPreferenceDialog that calls
setHelpAvailable(true) in its constructor and that's it, which is
discouraged due to restrictions on WorkbenchPreferenceDialog.
Furthermore, in either case, the dialog does show the button, however
shows the button for every preference page. This is a problem since I
have entries in my preference dialog that I do not have documentation
available for ("General" and "Help").
So my question is this:
1) Should I derive from WorkbenchPreferenceDialog anyway since the
modification is extremely small? And if so, how can I hide the other
preference entries that do not apply to my application?
2) or is there another method so that I can show the help button on only
the preference pages that have help documentation available?

I know that there's a lot here, and I'm sorry for being long-winded.
I've just been tracing through Eclipse's code for a couple hours now and
I've finally hit a roadblock and wanted to give as much background info
as I could. Thanks for your time!
Re: Providing Help in Preferences [message #662998 is a reply to message #662792] Fri, 01 April 2011 17:16 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
It's possible that the help button is not showing because

TrayDialog.setDialogHelpAvailable(true);

has not been called. This is a global preference which controls whether tray dialogs should show the button when help is available.

Turning off the help button for preferences pages that have no help may be more confusing to the user than leaving the button showing but having no help available.
Re: Providing Help in Preferences [message #664960 is a reply to message #662998] Tue, 12 April 2011 11:14 Go to previous message
Eclipse User
Originally posted by: spayne.s4isystems.com

I was afraid of that. Oh well, I was hoping to make it work on a
page-by-page basis without having to roll my own dialog, but I guess
this is the way it'll have to be. Thanks!

On 4/1/2011 2:16 PM, Chris Goldthorpe wrote:
> It's possible that the help button is not showing because
>
> TrayDialog.setDialogHelpAvailable(true);
>
> has not been called. This is a global preference which controls whether
> tray dialogs should show the button when help is available.
> Turning off the help button for preferences pages that have no help may
> be more confusing to the user than leaving the button showing but having
> no help available.
Previous Topic:Birt Nested Tables/Groups
Next Topic:Problem With Images In The Help File
Goto Forum:
  


Current Time: Thu Apr 24 06:40:58 EDT 2014

Powered by FUDForum. Page generated in 0.01524 seconds