Creating Eclipse help from within Eclipse
This topic explains how to create an Eclipse help documentation
plug-in from within the Eclipse platform. This process allows you
to set up repeatable builds directly within Eclipse, which may already
be familiar to many developers working within Eclipse. The topic was
originally written based on Eclipse 3.3, but much of the information
still applies.
You can use a template to develop documentation plug-in with DITA in Eclipse PDE and use
DITA-OT to build and pack the final plug-in. When you want to develop a documentation
plug-in with DITA in Eclipse, you cannot use the previous releases of DITA-OT in Eclipse to
transform DITA to HTML. Though previous releases of DITA-OT support the feature to transform
DITA files to Eclipse documentation plug-in, they are not integrated with Eclipse. With
DITA-OT integrated with WPT, you can develop document plug-ins with DITA in Eclipse PDE
and build and pack the final plug-in by taking the following steps.
Create a new PDE project in Eclipse, and apply the DITA
template to the project by following the wizard.Start Eclipse and create a new plug-in project
Set the source directory, the main ditamap file, the output directory (default value
is root directory of project), css storage directory (used to contain
common.css, commonltr.css, and
commonrtl.css), user customized .css file name, and conditional
processing ditaval file in the wizard. Use root as output directory
is selected as the default.You can also clear Use root as output
directory and specify another output directory.
Set directories
Specify another directory
Create DITA files in the source directory and a ditamap to include
the topic files that you created.
Import the DITA files into the src directory
of the DITA plug-in project you just created.
Right-click a directory that you want to put the imported files and select
Import
File system
.
Select an import file source
Select the directory under which you put the DITA files.
Select a directory
Click Finish after you selected the DITA files under the specified
directory. The DITA files are then imported to your DITA project.
Right click build.xml, select Run As
Ant Build.
If you're using Oracle JDK, please download and use the latest Xalan. The
Xalan shipped with Oracle JDK has some issue that will cause the build failure. You can
use the latest Xalan by selecting ANT Build ... and include the
all of Xalan's jar files in Classpath.
After the transformation, the output is in the output directory set in
build.xml. Refresh the project after the build is successful.
Run as Ant build
Set the Classpath
Edit the plug-in description of the property file MANITEST.MF in the
plug-in editor after you run the Ant build successfully.
Click MANITEST.MF to go to the Overview page.
Overview
Edit Dependencies to include org.eclipse.help.
Edit Dependencies
Edit Extensions to add org.eclipse.help.toc; right click the added
org.eclipse.help.toc, and select
Newtoc
.
Edit Extensions
Edit the Build Configuration to include the out directory or
the directory you specified in .
Edit Build Configuration
Save the changes you made to the property file MANITEST.MF.
Export the output to a documentation plug-in. build.xml
can be customized to meet the requirement of headless build.
Select
File
Export
; select Deployable plug-ins and fragments and
click Next.
Export a plug-in
Select the plug-in you want to export and specify a directory
under which you want to put the plug-in package.Select a plug-in and specify the export destination
Click Finish to export the plug-in package.