Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Re: help contexts question
Re: help contexts question [message #472297] Tue, 05 February 2008 09:24 Go to next message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2107
Registered: July 2009
Senior Member
The newsgroup for Help-related discussion is eclipse.platform.ua; I'm
redirecting this thread to there.


Derek Morris wrote:
> Hi,
>
> Apologies if this is the wrong place to ask this question - I looked but
> couldn't find a better one.
>
> I am trying to define and use help contextIds across plugins. I have a
> single documentation plugin and wish to use helpContextIds from my other
> plugins.
>
> In my documentation plugin.xml I have defined:
> <extension
> point="org.eclipse.help.contexts">
> <contexts
> file="helpContexts.xml"
> plugin="com.mydocsplugin">
> </contexts>
> </extension>
>
> In the plugin.xml of another plugin, I have defined:
> <extension
> point="org.eclipse.help.contexts">
> <contexts
> file="helpContexts.xml"
> plugin="com.crt.docs">
> </contexts>
> </extension>
>
> But this doesn't work (I get a file not found warning for
> helpContexts.xml). In the manifest editor, the "Browse" for the file
> only shows files in this plugin and not in the docs plugin.
>
> I've read the docs, but there is very little detail. Can anybody point
> me in the right direction for solving this?
>
> Thanks
Re: help contexts question [message #472298 is a reply to message #472297] Tue, 05 February 2008 19:49 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
You are not alone in finding the docs confusing.

Each context is defined by a context id and a plugin id. When your Java
code includes a line like this:

PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
"org.eclipse.test.viewer");

it defines the context id to be "viewer" and the context plugin to be
"org.eclipse.test". setHelp() should probably take two parameters, one
for the context id and one for the plugin id but instead it uses just
one parameter. When you hit F1 it will look for a context id of "viewer"
associated with plugin "org.eclipse.test".

In the extension point the "file" is always the path of a file from the
same plugin as the plugin.xml file which defines the contexts. The
"plugin" parameter if present defines the plugin id for any contexts in
that file, if omitted the plugin id will be that of the enclosing plugin.

The idea behind this is that you can define the contexts in a plugin
different to the one in which your java code lives, and you have
multiple contributions to the same context.
Re: help contexts question [message #472301 is a reply to message #472298] Wed, 06 February 2008 07:32 Go to previous message
Derek Morris is currently offline Derek Morris
Messages: 6
Registered: July 2009
Junior Member
Perfect - thats exactly what I wanted!

Now, why isn't that documented better - it's so easy!

Thanks for your help.
--
Derek


Chris Goldthorpe wrote:
> You are not alone in finding the docs confusing.
>
> Each context is defined by a context id and a plugin id. When your Java
> code includes a line like this:
>
> PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
> "org.eclipse.test.viewer");
>
> it defines the context id to be "viewer" and the context plugin to be
> "org.eclipse.test". setHelp() should probably take two parameters, one
> for the context id and one for the plugin id but instead it uses just
> one parameter. When you hit F1 it will look for a context id of "viewer"
> associated with plugin "org.eclipse.test".
>
> In the extension point the "file" is always the path of a file from the
> same plugin as the plugin.xml file which defines the contexts. The
> "plugin" parameter if present defines the plugin id for any contexts in
> that file, if omitted the plugin id will be that of the enclosing plugin.
>
> The idea behind this is that you can define the contexts in a plugin
> different to the one in which your java code lives, and you have
> multiple contributions to the same context.
Re: help contexts question [message #609374 is a reply to message #472297] Tue, 05 February 2008 19:49 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
You are not alone in finding the docs confusing.

Each context is defined by a context id and a plugin id. When your Java
code includes a line like this:

PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
"org.eclipse.test.viewer");

it defines the context id to be "viewer" and the context plugin to be
"org.eclipse.test". setHelp() should probably take two parameters, one
for the context id and one for the plugin id but instead it uses just
one parameter. When you hit F1 it will look for a context id of "viewer"
associated with plugin "org.eclipse.test".

In the extension point the "file" is always the path of a file from the
same plugin as the plugin.xml file which defines the contexts. The
"plugin" parameter if present defines the plugin id for any contexts in
that file, if omitted the plugin id will be that of the enclosing plugin.

The idea behind this is that you can define the contexts in a plugin
different to the one in which your java code lives, and you have
multiple contributions to the same context.
Re: help contexts question [message #609380 is a reply to message #472298] Wed, 06 February 2008 07:32 Go to previous message
Derek Morris is currently offline Derek Morris
Messages: 6
Registered: July 2009
Junior Member
Perfect - thats exactly what I wanted!

Now, why isn't that documented better - it's so easy!

Thanks for your help.
--
Derek


Chris Goldthorpe wrote:
> You are not alone in finding the docs confusing.
>
> Each context is defined by a context id and a plugin id. When your Java
> code includes a line like this:
>
> PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.get Control(),
> "org.eclipse.test.viewer");
>
> it defines the context id to be "viewer" and the context plugin to be
> "org.eclipse.test". setHelp() should probably take two parameters, one
> for the context id and one for the plugin id but instead it uses just
> one parameter. When you hit F1 it will look for a context id of "viewer"
> associated with plugin "org.eclipse.test".
>
> In the extension point the "file" is always the path of a file from the
> same plugin as the plugin.xml file which defines the contexts. The
> "plugin" parameter if present defines the plugin id for any contexts in
> that file, if omitted the plugin id will be that of the enclosing plugin.
>
> The idea behind this is that you can define the contexts in a plugin
> different to the one in which your java code lives, and you have
> multiple contributions to the same context.
Previous Topic:Context help that automatically displays HTML topic
Next Topic:General help documentation development question
Goto Forum:
  


Current Time: Fri Apr 18 11:40:00 EDT 2014

Powered by FUDForum. Page generated in 0.04941 seconds