Re: help contexts question [message #472297] |
Tue, 05 February 2008 09:24  |
Eclipse User |
|
|
|
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 #472301 is a reply to message #472298] |
Wed, 06 February 2008 07:32  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.05614 seconds