Community
Participate
Working Groups
Build Identifier: M20080911-1700 The Eclipse help on context-sensitive help says this: Context-sensitive help from multiple plug-ins Another level of flexibility is the ability to contribute context-sensitive help for the same context id from different plug-ins. This is useful, for example, if there are different sets of documentation plug-ins that may or may not be installed in a user's configuration. This allows each documentation plug-in to declare its contexts independently. The end user will see the merged context-sensitive help content for all plug-ins that contributed contexts for the widget's id. Note that the fully qualified context id for the widget must be used, since none of the documentation plug-ins declared the context id. When multiple plug-ins contribute context-sensitive help for the same context ID, the content defined in the plug-in that declared the context (the UI plug-in) is shown first. Additional descriptions and links are appended in no guaranteed order. ---end quote I was trying to do this for the Project Explorer and in my context file refer to the Project Explorer context id and qualify it with its package name. I ran Eclipse in debug mode using an options file with help debugging enabled (as described in the forums). The debug output showed me that the context ID being called was org.eclipse.ui.navigator.common_navigator. So, in my contexts file, I added this: <context id="org.eclipse.ui.navigator.common_navigator"> <description>DataXtend Projects in the Project Explorer view</description> <topic label="DataXtend Projects in the Project Explorer view" href=" /com.progress.dataxtend.si.help/GettingStarted/WorkbenchTour .12.03.html " /> </context> But, no go, my topic does not appear in the Related Topics links with the workbench help for this ID. I apologize in advance if this is not a bug, and I am simply referencing the Project Explorer's plugin incorrectly. However, I posted this question on the forum last week and have received no reply and I have to get this working ASAP. The Eclipse User Assistance documentation would be so much more useful if it provided a simple example! Reproducible: Always
You need to do the following: 1. In plugin.xml for the bundle where the context is declares use the "plugin" attribute to indicate that any contexts declared refer to another plug-in. <extension point="org.eclipse.help.contexts"> <contexts file="contexts.xml" plugin="org.eclipse.ui.navigator"> </contexts> </extension> 2. In the contexts.xml file do not qualify the context id. <context id="navigator.common_navigator"> I did not notice your question on the Platform - User Assistance Forum. I may have overlooked it.
(In reply to comment #1) > You need to do the following: > > 1. In plugin.xml for the bundle where the context is declares use the "plugin" > attribute to indicate that any contexts declared refer to another plug-in. > > <extension > point="org.eclipse.help.contexts"> > <contexts > file="contexts.xml" > plugin="org.eclipse.ui.navigator"> > </contexts> > </extension> > > 2. In the contexts.xml file do not qualify the context id. > > <context id="navigator.common_navigator"> > > I did not notice your question on the Platform - User Assistance Forum. I may > have overlooked it. This doesn't seem to be working. I have my own contexts file, so this would mean I would need to create two separate contexts files. I did, declared them like this in plugin.xml: <extension point="org.eclipse.help.contexts"> <contexts file="contexts.xml" plugin="com.progress.dataxtend.si.help" /> <contexts file="ext_contexts.xml" plugin="org.eclipse.ui.navigator" /> </extension> Then, I created ext_contexts.xml and put this context in it: <context id="org.eclipse.ui.navigator.common_navigator"> <description>DataXtend Projects in the Project Explorer view</description> <topic label="DataXtend Projects in the Project Explorer view" href="/com.progress.dataxtend.si.help/GettingStarted/WorkbenchTour.12.03.html" /> </context> The F1 help still continues to show only the Eclipse-provided help links in the top of the window. Mine does show in the dynamic help pane. Any ideas?
(In reply to comment #2) > (In reply to comment #1) > > You need to do the following: > > > > 1. In plugin.xml for the bundle where the context is declares use the "plugin" > > attribute to indicate that any contexts declared refer to another plug-in. > > > > <extension > > point="org.eclipse.help.contexts"> > > <contexts > > file="contexts.xml" > > plugin="org.eclipse.ui.navigator"> > > </contexts> > > </extension> > > > > 2. In the contexts.xml file do not qualify the context id. > > > > <context id="navigator.common_navigator"> > > > > I did not notice your question on the Platform - User Assistance Forum. I may > > have overlooked it. > > > This doesn't seem to be working. I have my own contexts file, so this would > mean I would need to create two separate contexts files. I did, declared them > like this in plugin.xml: > > <extension point="org.eclipse.help.contexts"> > <contexts file="contexts.xml" plugin="com.progress.dataxtend.si.help" /> > <contexts file="ext_contexts.xml" plugin="org.eclipse.ui.navigator" /> > </extension> > > Then, I created ext_contexts.xml and put this context in it: > > <context id="org.eclipse.ui.navigator.common_navigator"> > <description>DataXtend Projects in the Project Explorer view</description> > <topic label="DataXtend Projects in the Project Explorer view" > href="/com.progress.dataxtend.si.help/GettingStarted/WorkbenchTour.12.03.html" > /> > </context> > > The F1 help still continues to show only the Eclipse-provided help links in the > top of the window. Mine does show in the dynamic help pane. Any ideas? Sorry, didn't show the whole ext_contexts.xml: <?xml version="1.0" encoding="utf-8"?> <?NLS TYPE="org.eclipse.help.contexts"?> <contexts xmlns="urn:Eclipse-Contexts-Schema"> <context id="org.eclipse.ui.navigator.common_navigator"> <description>DataXtend Projects in the Project Explorer view</description> <topic label="DataXtend Projects in the Project Explorer view" href="/com.progress.dataxtend.si.help/GettingStarted/WorkbenchTour.12.03.html" /> </context> </contexts>
Can you change the first line of ext_contexts.xml to this? <context id="common_navigator">
(In reply to comment #4) > Can you change the first line of ext_contexts.xml to this? > > <context id="common_navigator"> Yay! that worked. And previously, I had tried navigator.common_navigator as you suggested originally.
I'm glad it's working now. I'll close the bug.