Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Idiots guide to adding Contextual Help
Idiots guide to adding Contextual Help [message #474604] Thu, 09 October 2008 15:59 Go to next message
Eclipse UserFriend
Originally posted by: j.hurrell.don'tspamme.castsoftware.com

Does anyone know of an idiots guide to adding contextual help to our
Eclipse Plugin (targeted at Eclipse 3.3 and 3.4)

The plugin is intergrated into Eclipse (not an RCP) and I have managed
to create and package a help plugin that successfully displays within
the Eclipse Help system.

I have added the contexts.xml file with appropriate IDs and our
developer has integrated the call into the code:

PlatformUI.getWorkbench().getHelpSystem().setHelp(itsBrowser ,
"com.ourcompany.devplugin.help.the_browser");

However we seem to be having some issues getting the Help to display
correctly when the focus is on our views and the user taps F1. The
included Eclipse help on the subject is somewhat vague (but maybe it's
as simple as it suggests?) so i'm wondering if there is anything like an
idiots guid out there?

Many thanks.
Re: Idiots guide to adding Contextual Help [message #474605 is a reply to message #474604] Thu, 09 October 2008 19:57 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
If you are using Eclipse 3.4 you can create a plugin with a view which
contains context help, File->New->Plug-in Project. Select "plugin with a
view" from the available templates, this will create a view with Context
help so that you have a working example to play around with.
Re: Idiots guide to adding Contextual Help [message #474607 is a reply to message #474605] Fri, 10 October 2008 11:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: j.hurrell.don'tspamme.castsoftware.com

Chris Goldthorpe wrote:
> If you are using Eclipse 3.4 you can create a plugin with a view which
> contains context help, File->New->Plug-in Project. Select "plugin with a
> view" from the available templates, this will create a view with Context
> help so that you have a working example to play around with.

Thanks for your reply Chris. This indeed does work, however it is
interesting to note that in this scenario, the contexts.xml file is
bundled in to the source code plugin, not the help plugin (as I have
been doing).

In addition, the declaration of the ID in the code is different to that
suggested in the Eclipse help:

Eclipse help:

PlatformUI.getWorkbench().getHelpSystem().setHelp(myButton,
com.example.helpexample.panic_button);

Using the wizard:
PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
"TEST.viewer");
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();

Should we instead be bundling a contexts.xml file into each of our
source code plugins (bearing in mind we have a few) and changing the
declaration of the ID in the source code to reflect the wizard example,
or are they just two different ways to do this?
Re: Idiots guide to adding Contextual Help [message #474609 is a reply to message #474607] Fri, 10 October 2008 20:10 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
The context help does not have to be in the same plug-in as the Java
code, and if you have separate development and doc teams it makes sense
to put them in separate plug-ins.

James Hurrell wrote:
> Chris Goldthorpe wrote:
>> If you are using Eclipse 3.4 you can create a plugin with a view which
>> contains context help, File->New->Plug-in Project. Select "plugin with
>> a view" from the available templates, this will create a view with
>> Context help so that you have a working example to play around with.
>
> Thanks for your reply Chris. This indeed does work, however it is
> interesting to note that in this scenario, the contexts.xml file is
> bundled in to the source code plugin, not the help plugin (as I have
> been doing).
>
> In addition, the declaration of the ID in the code is different to that
> suggested in the Eclipse help:
>
> Eclipse help:
>
> PlatformUI.getWorkbench().getHelpSystem().setHelp(myButton,
> com.example.helpexample.panic_button);
>
> Using the wizard:
> PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
> "TEST.viewer");
> makeActions();
> hookContextMenu();
> hookDoubleClickAction();
> contributeToActionBars();
>
> Should we instead be bundling a contexts.xml file into each of our
> source code plugins (bearing in mind we have a few) and changing the
> declaration of the ID in the source code to reflect the wizard example,
> or are they just two different ways to do this?
Re: Idiots guide to adding Contextual Help [message #620071 is a reply to message #474604] Thu, 09 October 2008 19:57 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
If you are using Eclipse 3.4 you can create a plugin with a view which
contains context help, File->New->Plug-in Project. Select "plugin with a
view" from the available templates, this will create a view with Context
help so that you have a working example to play around with.
Re: Idiots guide to adding Contextual Help [message #620073 is a reply to message #474605] Fri, 10 October 2008 11:23 Go to previous message
Eclipse UserFriend
Originally posted by: j.hurrell.don'tspamme.castsoftware.com

Chris Goldthorpe wrote:
> If you are using Eclipse 3.4 you can create a plugin with a view which
> contains context help, File->New->Plug-in Project. Select "plugin with a
> view" from the available templates, this will create a view with Context
> help so that you have a working example to play around with.

Thanks for your reply Chris. This indeed does work, however it is
interesting to note that in this scenario, the contexts.xml file is
bundled in to the source code plugin, not the help plugin (as I have
been doing).

In addition, the declaration of the ID in the code is different to that
suggested in the Eclipse help:

Eclipse help:

PlatformUI.getWorkbench().getHelpSystem().setHelp(myButton,
com.example.helpexample.panic_button);

Using the wizard:
PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
"TEST.viewer");
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();

Should we instead be bundling a contexts.xml file into each of our
source code plugins (bearing in mind we have a few) and changing the
declaration of the ID in the source code to reflect the wizard example,
or are they just two different ways to do this?
Re: Idiots guide to adding Contextual Help [message #620075 is a reply to message #474607] Fri, 10 October 2008 20:10 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
The context help does not have to be in the same plug-in as the Java
code, and if you have separate development and doc teams it makes sense
to put them in separate plug-ins.

James Hurrell wrote:
> Chris Goldthorpe wrote:
>> If you are using Eclipse 3.4 you can create a plugin with a view which
>> contains context help, File->New->Plug-in Project. Select "plugin with
>> a view" from the available templates, this will create a view with
>> Context help so that you have a working example to play around with.
>
> Thanks for your reply Chris. This indeed does work, however it is
> interesting to note that in this scenario, the contexts.xml file is
> bundled in to the source code plugin, not the help plugin (as I have
> been doing).
>
> In addition, the declaration of the ID in the code is different to that
> suggested in the Eclipse help:
>
> Eclipse help:
>
> PlatformUI.getWorkbench().getHelpSystem().setHelp(myButton,
> com.example.helpexample.panic_button);
>
> Using the wizard:
> PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
> "TEST.viewer");
> makeActions();
> hookContextMenu();
> hookDoubleClickAction();
> contributeToActionBars();
>
> Should we instead be bundling a contexts.xml file into each of our
> source code plugins (bearing in mind we have a few) and changing the
> declaration of the ID in the source code to reflect the wizard example,
> or are they just two different ways to do this?
Previous Topic:Re: eclipse help system
Next Topic:Eclipse 3.4 adding remote infocenter
Goto Forum:
  


Current Time: Sun Dec 08 18:53:05 GMT 2024

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

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

Back to the top