Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Eclipse UA gurus: What's the best or right way to hook my own help topic to the ? button for my own
Eclipse UA gurus: What's the best or right way to hook my own help topic to the ? button for my own [message #472331] Mon, 18 February 2008 22:26 Go to next message
Eclipse User
Originally posted by: nospam_kowalskilee.gmail.com

Hi,

If I have created my own wizard or wizard dialog, what do I need to do
to have the ? button open to my own help topic?

If it's via context ids, then how do you register the context id for a
wizard?

I found these two eclipse.platform newsgroup postings:
http://dev.eclipse.org/newslists/news.eclipse.platform/msg60 928.html
and
http://dev.eclipse.org/newslists/news.eclipse.platform/msg60 929.html

The second one says that you have to override the DialogPage method
public void performHelp()
{
PlatformUI.getWorkbench().getHelpSystem().displayHelp(contex tID);
}

Is that the best way? The 'right' way to do it?

Thanks!
Lee Anne Kowalski
(to email me, remove the nospam_ from my email name).
Re: Eclipse UA gurus: What's the best or right way to hook my own help topic to the ? button for my [message #472337 is a reply to message #472331] Wed, 20 February 2008 20:05 Go to previous messageGo to next message
David Kyle is currently offline David Kyle
Messages: 125
Registered: July 2009
Senior Member
Lee Anne,

We set the context id in our wizard page.

public class MyWizardPage extends WizardPage
public void createControl(Composite parent) {
PlatformUI.getWorkbench.getHelpSystem.setHelp(parent,
MyPluginActivator.ID + ".mycontexthelpid");
}
}

and we set help for the wizard dialog.

WizardDialog dialog = new WizardDialog(.....);
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.get Shell(),
"mycontexthelp.id");

We don't override performHelp().

As for the help context id. Define a context xml file in your plugin.

<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.contexts"?>
<contexts>
<context id="mycontexthelpid" >
<description>My wizard help.</description>
<topic label="Wizard help" href="reference/wizard/help.xhtml"/>
</context>
</contexts>

in your plugin

<plugin>
<extension point="org.eclipse.help.contexts">
<contexts file="mywizard.xml" plugin="com.mypluginid"/>
</extension>
</plugin>

A common problem is messing up the plugin and context help ids. You can set
a couple of break points to see which context id is being requested (see my
blog).

David Kyle
http://richclientplatform.blogspot.com/
Re: Eclipse UA gurus: What's the best or right way to hook my own help topic to the ? button for my [message #472342 is a reply to message #472337] Thu, 21 February 2008 14:26 Go to previous message
Eclipse User
Originally posted by: nospam_kowalskilee.gmail.com

Thanks David! I'll give it a go. :-)

btw, I like your blog.

Best regards,
Lee Anne
Re: Eclipse UA gurus: What's the best or right way to hook my own help topic to the ? button for my [message #609947 is a reply to message #472331] Wed, 20 February 2008 20:05 Go to previous message
David Kyle is currently offline David Kyle
Messages: 125
Registered: July 2009
Senior Member
Lee Anne,

We set the context id in our wizard page.

public class MyWizardPage extends WizardPage
public void createControl(Composite parent) {
PlatformUI.getWorkbench.getHelpSystem.setHelp(parent,
MyPluginActivator.ID + ".mycontexthelpid");
}
}

and we set help for the wizard dialog.

WizardDialog dialog = new WizardDialog(.....);
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.get Shell(),
"mycontexthelp.id");

We don't override performHelp().

As for the help context id. Define a context xml file in your plugin.

<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.contexts"?>
<contexts>
<context id="mycontexthelpid" >
<description>My wizard help.</description>
<topic label="Wizard help" href="reference/wizard/help.xhtml"/>
</context>
</contexts>

in your plugin

<plugin>
<extension point="org.eclipse.help.contexts">
<contexts file="mywizard.xml" plugin="com.mypluginid"/>
</extension>
</plugin>

A common problem is messing up the plugin and context help ids. You can set
a couple of break points to see which context id is being requested (see my
blog).

David Kyle
http://richclientplatform.blogspot.com/
Re: Eclipse UA gurus: What's the best or right way to hook my own help topic to the ? button for my [message #609951 is a reply to message #472337] Thu, 21 February 2008 14:26 Go to previous message
Eclipse User
Originally posted by: nospam_kowalskilee.gmail.com

Thanks David! I'll give it a go. :-)

btw, I like your blog.

Best regards,
Lee Anne
Previous Topic:Distributing modified Eclipse platform help
Next Topic:Distributing modified Eclipse platform help
Goto Forum:
  


Current Time: Thu Oct 23 16:03:31 GMT 2014

Powered by FUDForum. Page generated in 0.20853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software