|
Re: Defining help contexts [message #330782 is a reply to message #330648] |
Wed, 13 August 2008 13:14 |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Tom Coxon wrote:
> I've made a plugin that declares a class extending StatusDialog, and
> inherits the help button in the lower-left corner. How can I attach my
> help context to it?
>
> In plugin.xml I've got this:
> <extension point="org.eclipse.help.contexts">
> <contexts file="helpContexts.xml"/>
> </extension>
>
> and in helpContexts.xml I've got this:
> <contexts>
> <context id="mydialog_contextid">
> <description>Here's my description.</description>
> <topic href="html/stuff.html" label="A help topic"/>
> </context>
> </contexts>
>
> I've tried overriding the protected createDialogArea method:
> protected Control createDialogArea(Composite parent) {
> IWorkbench workbench = PlatformUI.getWorkbench();
> workbench.getHelpSystem().setHelp(parent, "mydialog_contextid");
>
> Except then when I press the help button it says "The context help for
> this user interface element could not be found." (Without the code I put
> in createDialogArea it just says the default "Each workbench window
> contains one or more ...", so it is doing something...)
I think you need to call setHelp() passing the Control that is returned
from createDialogArea() instead of the parent argument. Like this:
Hope this helps,
Eric
|
|
|
|
Re: Defining help contexts [message #330833 is a reply to message #330799] |
Thu, 14 August 2008 13:20 |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Tom Coxon wrote:
> Then I get the default message about workbench windows, and not my help
> context. :-/
It seems to depend on what control has focus when the Help button is
clicked. In our dialogs I call setHelp() for the result of
DialogPage.getControl() AND the Control that is returned from
createDialogControl(), and that seems to work regardless of where the
user clicks (or doesn't click) before clicking the ? button.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.02765 seconds