Preparing Microsoft Word Source Documents : Specifying Context Plug-ins in Word
 
Specifying Context Plug-ins in Word
You can specify Eclipse Help context plug-ins by using Context Plugin markers in your source documents. ePublisher places the context plug-ins you specify in your source documents in the plugin.xml file generated for each source document group you have in Document Manager. You can then have developers use the context plug-ins defined in plugin.xml files to call your Eclipse Help system as appropriate from Eclipse plug-ins.
For example, assume you have the following three top-level groups in Document Manager for your Eclipse Help system target:
*Component A group - contains the source documents for ComponentA Feature1 and ComponentA Feature2
*Component B group - contains the source documents for ComponentB Feature1 and ComponentB Feature 2
*Component C group - contains the source documents for ComponentC Feature1 and ComponentC Feature 2
You insert the following Context Plugin markers into the source documents for each group:
*ComponentAFeature1 and ComponentAFeature2 Context Plugin markers in source documents contained in the ComponentA group
*ComponentBFeature1 and ComponentBFeature2 Context Plugin markers in source documents contained in the ComponentB group
*ComponentCFeature1 and ComponentCFeature2 Context Plugin markers in source documents contained in the ComponentC group
When you generate your Eclipse Help system, ePublisher creates the following folder structure in the ProjectName\Output\TargetName folder, where ProjectName is the name of your ePublisher project, and TargetName is the name of your target:
*ComponentA folder, which contains a plugin.xml file with the following entries:
plugin="ComponentAFeature1ContextPlugin"
plugin="ComponentAFeature2ContextPlugin"
*ComponentB folder, which contains a plugin.xml file with the following entries:
plugin="ComponentBFeature1ContextPlugin"
plugin="ComponentBFeature2ContextPlugin"
*ComponentC folder, which contains a plugin.xml file with the following entries:
plugin="ComponentCFeature1ContextPlugin"
plugin="ComponentCFeature2ContextPlugin"
You can then provide the context plug-in IDs in your plugin.xml files to the appropriate Eclipse developers to use. The Eclipse developers use the context plug-ins defined in plugin.xml files to call your Eclipse Help system as appropriate from Eclipse plug-ins.
To specify a context plug-in in a Microsoft Word source document
1. Identify a topic in a source document where you want to insert the context plug-in.
2. On the WebWorks menu, click Markers.
3. In the Marker Type field, select Context Plugin from the list of markers.
4. In the Value field, type the appropriate ID for the context plug-in.
Note: If you are responsible for defining the ID, ensure you supply the context plug-in ID to your developers to use as appropriate for their Eclipse plug-ins. If your developers define the ID, use the context plug-in ID you obtained from your developers.
5. Click OK.
6. Save your Microsoft Word source document.
7. Generate output for your project. For more information, see “Generating Output”.
8. In Output Explorer, verify ePublisher generated a plugin.xml file that contains the context plug-in IDs you specified by completing the following steps:
a. On the View menu, click Output Directory.
b. Open the ProjectName folder, where ProjectName is the name of your project.
c. Open the group folder for a group that contains the source documents where you specified your context plug-in ID.
d. Open the plugin.xml file in Notepad and verify that the context plug-in IDs you specified in your source documents are listed in the plugin.xml file. Your context plug-in IDs should be listed in the Contexts area of the file. Following is an example of the how the context plug-in IDs you specified in your source documents should be displayed in the plugin.xml file:
<!-- Contexts -->
<!-- -->
<extension point="org.eclipse.help.contexts">
<contexts file="contexts.xml" plugin="ComponentAFeature1ContextPlugin" />
</extension>
<extension point="org.eclipse.help.contexts">
<contexts file="contexts.xml" plugin="ComponentAFeature2ContextPlugin" />
</extension>