Idiots guide to adding Contextual Help [message #474604] |
Thu, 09 October 2008 15:59 |
Eclipse User |
|
|
|
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 #474607 is a reply to message #474605] |
Fri, 10 October 2008 11:23 |
Eclipse User |
|
|
|
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 |
Chris Goldthorpe 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 #620073 is a reply to message #474605] |
Fri, 10 October 2008 11:23 |
Eclipse User |
|
|
|
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 |
Chris Goldthorpe 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?
|
|
|
Powered by
FUDForum. Page generated in 0.03911 seconds