Diff for Setting up the Eclipse Help Infocenter for publishing Dita content
Sun, 2008-03-16 16:08 by tomed | Sun, 2008-03-16 16:28 by tomed | ||
---|---|---|---|
Setting up an Eclipse Infocenter | Attempting to display pre-formatted code. | ||
next diff > | |||
Changes to Body | |||
Line 1 | Line 1 | ||
- | <h1>Creating a Stand Alone Eclipse Infocenter for Dita</h1><br />
| + | <h1>Creating a Stand Alone Eclipse Infocenter for Dita</h1>
|
- | <br />
| + | <p>
|
- | <p>The Dita Open Toolkit offers an actively maintained output for Eclipse<br />
| + | The Dita Open Toolkit offers an actively maintained output for Eclipse
|
- | Help. One of the features of this help system is that it can be deployed as a<br />
| + | Help. One of the features of this help system is that it can be deployed as a
|
- | stand alone help server.</p><br />
| + | stand alone help server.
|
- | <br />
| + | </p>
|
- | <p>This feature allows any valid Dita content to be served by a sophisticated<br />
| + | This feature allows any valid Dita content to be served by a sophisticated
|
- | and well maintained help system, that is free for personal and commercial<br />
| + | and well maintained help system, that is free for personal and commercial
|
- | use. Eclipse Help rivals commercial products in its stability and feature<br />
| + | use. Eclipse Help rivals commercial products in its stability and feature
|
- | set.</p><br />
| + | set.
|
- | <br />
| + | <p>
|
- | <p>The only cost (so far) that I have seen in deploying this system is that<br />
| + | The only cost (so far) that I have seen in deploying this system is that
|
- | it is designed for Eclipse and Java developers. Setup of the system is not<br />
| + | it is designed for Eclipse and Java developers. Setup of the system is not
|
- | obvious for someone who lives and works outside of the Eclipse universe, due<br />
| + | obvious for someone who lives and works outside of the Eclipse universe, due
|
- | to the Eclipse documentation, which is oriented towards program development.<br />
| + | to the Eclipse documentation, which is oriented towards program development.
|
- | Actual setup for documentation purposes is not difficult.</p><br />
| + | Actual setup for documentation purposes is not difficult.
|
- | <br />
| + | </p>
|
- | <p>The purpose of this document is to minimize the pain of Eclipse Help<br />
| + | <p>
|
- | deployment for those wishing to use the Dita Eclipse Help transformation<br />
| + | The purpose of this document is to minimize the pain of Eclipse Help
|
- | type.</p><br />
| + | deployment for those wishing to use the Dita Eclipse Help transformation
|
- | <br />
| + | type.
|
- | <p>This document is based on deployment of the current Eclipse stable<br />
| + | </p>
|
- | release, 3.3.2, from February 21, 2008. If you use a different release<br />
| + | <p>
|
- | of Eclipse, then file name references given in the following examples<br />
| + | This document is based on deployment of the current Eclipse stable
|
- | may not match your installation.</p><br />
| + | release, 3.3.2, from February 21, 2008. If you use a different release
|
- | <br />
| + | of Eclipse, then file name references given in the following examples
|
- | <h2>The Eclipse Platform Runtime Binary Package</h2><br />
| + | may not match your installation.
|
- | <br />
| + | </p>
|
- | <p>The Eclipse Platform Runtime Binary package is available from the </p><br />
| + | <h2>The Eclipse Platform Runtime Binary Package</h2>
|
- | <br />
| + | <p>
|
- | <p><a<br />
| + | The Eclipse Platform Runtime Binary package is available from the
|
- | href="http://download.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php">Eclipse 3.3.2 Download Page</a></p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>Download the Platform Runtime Binary package that is appropriate for your<br />
| + | <a href="http://download.eclipse.org/eclipse/downloads/drops/R-3.3.2-200802211800/index.php">Eclipse
|
- | platform.</p><br />
| + | 3.3.2 Download Page</a>
|
- | <br />
| + | </p>
|
- | <p>Be sure to download the Platform Runtime Binary package, instead of the<br />
| + | <p>
|
- | entire Eclipse development environment. The Platform Runtime Binary package<br />
| + | Download the Platform Runtime Binary package that is appropriate for your
|
- | is only around 40M to download, whereas versions of the development<br />
| + | platform.
|
- | environment can be 100M and up.</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>The Platform Runtime Binary package is distributed as an archive file, and<br />
| + | Be sure to download the Platform Runtime Binary package, instead of the
|
- | can be unarchived at any suitable location.</p><br />
| + | entire Eclipse development environment. The Platform Runtime Binary package
|
- | <br />
| + | is only around 40M to download, whereas versions of the development
|
- | <h2>Setting Up Your First Dita Document</h2><br />
| + | environment can be 100M and up.
|
- | <br />
| + | </p>
|
- | <p>Render a Dita map and topic content using the "eclipsehelp" transformation<br />
| + | <p>
|
- | type. See the Dita User Guide for instructions on how to run a Dita<br />
| + | The Platform Runtime Binary package is distributed as an archive file, and
|
- | transformation.</p><br />
| + | can be unarchived at any suitable location.
|
- | <br />
| + | </p>
|
- | <p>After rendering, the output directory will contain an Eclipse Help plugin.<br />
| + | <h2>Setting Up Your First Dita Document</h2>
|
- | Simply copy the entire output directory to:</p><br />
| + | <p>
|
- | <br />
| + | Render a Dita map and topic content using the "eclipsehelp" transformation
|
- | <p>&lt;where you installed the Eclipse Platform Runtime Binary<br />
| + | type. See the Dita User Guide for instructions on how to run a Dita
|
- | package&gt;/eclipse/plugins</p><br />
| + | transformation.
|
- | <br />
| + | </p>
|
- | <p>so that the copied output directory is beneath the plugins directory. For<br />
| + | <p>
|
- | example, if you were to render the Dita Users' Guide, you could copy the<br />
| + | After rendering, the output directory will contain an Eclipse Help plugin.
|
- | output directory to:</p><br />
| + | Simply copy the entire output directory to:
|
- | <br />
| + | </p>
|
- | <p>&lt;where you installed the Eclipse Platform Runtime Binary<br />
| + | <p>
|
- | package&gt;/eclipse/plugins/dita-uguide</p><br />
| + | <where you installed the Eclipse Platform Runtime Binary
|
- | <br />
| + | package>/eclipse/plugins
|
- | <h2>Starting the Eclipse Infocenter</h2><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>The Infocenter requires Sun Java 1.5. Start the Infocenter with the<br />
| + | so that the copied output directory is beneath the plugins directory. For
|
- | following command:</p><br />
| + | example, if you were to render the Dita Users' Guide, you could copy the
|
- | <br />
| + | output directory to:
|
- | <p><code>java -classpath<br />
| + | </p>
|
- | &lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jar<br />
| + | <p>
|
- | org.eclipse.help.standalone.Infocenter -command start -eclipsehome<br />
| + | <where you installed the Eclipse Platform Runtime Binary
|
- | &lt;eclipse-location&gt;/eclipse -port 8081</code></p><br />
| + | package>/eclipse/plugins/dita-uguide
|
- | <br />
| + | </p>
|
- | <p>where &lt;eclipse-location&gt; is the point where you installed the<br />
| + | <h2>Starting the Eclipse Infocenter</h2>
|
- | Eclipse Platform Runtime Binary package.</p><br />
| + | <p>
|
- | <br />
| + | The Infocenter requires Sun Java 1.5. Start the Infocenter with the
|
- | <p>NB: This command is run on a single line.</p><br />
| + | following command:
|
- | <br />
| + | </p>
|
- | <p>Point your favorite browser to http://localhost:8081/help/index.jsp</p><br />
| + | <p>
|
- | <br />
| + | java -classpath
|
- | <p>The Infocenter will appear, with bookmarks to the left, and an Eclipse<br />
| + | <eclipse-location>/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jar
|
- | welcome page in the right frame.</p><br />
| + | org.eclipse.help.standalone.Infocenter -command start -eclipsehome
|
- | <br />
| + | <eclipse-location>/eclipse -port 8081
|
- | <p>The first few bookmarks will be Eclipse platform documentation. At the<br />
| + | </p>
|
- | bottom of the bookmark list, you should see your Dita document.</p><br />
| + | <p>
|
- | <br />
| + | where <eclipse-location> is the point where you installed the
|
- | <p>To shut down the Infocenter, re-run the above command, but with the<br />
| + | Eclipse Platform Runtime Binary package.
|
- | augument "-command shutdown"</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <h2>Customization and Branding</h2><br />
| + | NB: This command is run on a single line.
|
- | <br />
| + | </p>
|
- | <p>When you opened the Infocenter, you probably noticed how the help system<br />
| + | <p>
|
- | was branded as an Eclipse product. To change the branding to suit your Dita<br />
| + | Point your favorite browser to http://localhost:8081/help/index.jsp
|
- | documentation requires editing a set of configuration files.</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <h3>Product Branding</h3><br />
| + | The Infocenter will appear, with bookmarks to the left, and an Eclipse
|
- | <br />
| + | welcome page in the right frame.
|
- | <p>With your favorite text editor, open:</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin.properties</p><br />
| + | The first few bookmarks will be Eclipse platform documentation. At the
|
- | <br />
| + | bottom of the bookmark list, you should see your Dita document.
|
- | <p>Near the top of the file, you will see:</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p><code>productName=Eclipse Platform</code></p><br />
| + | To shut down the Infocenter, re-run the above command, but with the
|
- | <br />
| + | augument "-command shutdown"
|
- | <p>Change this to suit your Dita documentation.</p><br />
| + | </p>
|
- | <br />
| + | <h2>Customization and Branding</h2>
|
- | <p>To activate this variable, it may be necessary to erase the Eclipse<br />
| + | <p>
|
- | runtime cache. As of this writing, the only way I know how to do this is to<br />
| + | When you opened the Infocenter, you probably noticed how the help system
|
- | delete the cache by hand. After shutting down the Infocenter, go to:</p><br />
| + | was branded as an Eclipse product. To change the branding to suit your Dita
|
- | <br />
| + | documentation requires editing a set of configuration files.
|
- | <p>&lt;eclipse-location&gt;/eclipse/configuration</p><br />
| + | </p>
|
- | <br />
| + | <h3>Product Branding</h3>
|
- | <p>Delete all directories that start with "org.", being careful<br />
| + | <p>
|
- | <strong>NOT</strong> to delete the file "config.ini"</p><br />
| + | With your favorite text editor, open:
|
- | <br />
| + | </p>
|
- | <h3>Bookmarks</h3><br />
| + | <p>
|
- | <br />
| + | <eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin.properties
|
- | <p>To hide the Eclipse documentation listed in the bookmarks, edit the<br />
| + | </p>
|
- | file:</p><br />
| + | <p>
|
- | <br />
| + | Near the top of the file, you will see:
|
- | <p>&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/helpData.xml</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>Change the tocOrder tag to "hidden" to hide the Eclipse bookmarks. The<br />
| + | productName=Eclipse Platform
|
- | file should look like:</p><br />
| + | </p>
|
- | <pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
| + | <p>
|
- | &lt;extensions&gt;<br />
| + | Change this to suit your Dita documentation.
|
- | &lt;hidden&gt;<br />
| + | </p>
|
- | &lt;toc id="/org.eclipse.platform.doc.user/toc.xml"/&gt;<br />
| + | <p>
|
- | &lt;toc id="/org.eclipse.jdt.doc.user/toc.xml"/&gt;<br />
| + | To activate this variable, it may be necessary to erase the Eclipse
|
- | &lt;toc id="/org.eclipse.platform.doc.isv/toc.xml"/&gt;<br />
| + | runtime cache. As of this writing, the only way I know how to do this is to
|
- | &lt;toc id="/org.eclipse.jdt.doc.isv/toc.xml"/&gt;<br />
| + | delete the cache by hand. After shutting down the Infocenter, go to:
|
- | &lt;toc id="/org.eclipse.pde.doc.user/toc.xml"/&gt;<br />
| + | </p>
|
- | &lt;/hidden&gt;<br />
| + | <p>
|
- | &lt;/extensions&gt;</pre><br />
| + | <eclipse-location>/eclipse/configuration
|
- | <br />
| + | </p>
|
- | <p>If you have several Dita documents served by the Infocenter, they will<br />
| + | <p>
|
- | appear in the bookmark list in a default order. If you would like to modify<br />
| + | Delete all directories that start with "org.", being careful
|
- | the order, you can use the helpData.xml file to do so. This is done with the<br />
| + | <strong>NOT</strong> to delete the file "config.ini"
|
- | tocOrder element. For example:</p><br />
| + | </p>
|
- | <pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
| + | <h3>Bookmarks</h3>
|
- | &lt;extensions&gt;<br />
| + | <p>
|
- | &lt;tocOrder&gt;<br />
| + | To hide the Eclipse documentation listed in the bookmarks, edit the
|
- | &lt;toc id="/dita-userguide/DITA-userguide.xml"/&gt;<br />
| + | file:
|
- | &lt;toc id="/another-doc/DOC-document.xml"/&gt;<br />
| + | </p>
|
- | &lt;/tocOrder&gt;<br />
| + | <p>
|
- | &lt;hidden&gt;<br />
| + | <eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/helpData.xml
|
- | &lt;toc id="/org.eclipse.platform.doc.user/toc.xml"/&gt;<br />
| + | </p>
|
- | &lt;toc id="/org.eclipse.jdt.doc.user/toc.xml"/&gt;<br />
| + | <p>
|
- | &lt;toc id="/org.eclipse.platform.doc.isv/toc.xml"/&gt;<br />
| + | Change the tocOrder tag to "hidden" to hide the Eclipse bookmarks. The
|
- | &lt;toc id="/org.eclipse.jdt.doc.isv/toc.xml"/&gt;<br />
| + | file should look like:
|
- | &lt;toc id="/org.eclipse.pde.doc.user/toc.xml"/&gt;<br />
| + | </p>
|
- | &lt;/hidden&gt;<br />
| + | <p>
|
- | &lt;/extensions&gt;</pre><br />
| + | <?xml version="1.0" encoding="utf-8"?>
|
- | <br />
| + | </p>
|
- | <p>The content of the id attribute in the above example is not a<br />
| + | <p>
|
- | filename reference. Instead, it is based on information contained in<br />
| + | <extensions>
|
- | the Dita document plugin configuration file. This file is named<br />
| + | </p>
|
- | "plugin.xml," and is located in the Dita eclipsehelp output<br />
| + | <p>
|
- | directory. For example, in the Dita User Guide output located at:</p><br />
| + | <hidden>
|
- | <br />
| + | </p>
|
- | <p>&lt;eclipse-location&gt;/eclipse/plugins/dita-ugide/plugin.xml</p><br />
| + | <p>
|
- | <br />
| + | <toc id="/org.eclipse.platform.doc.user/toc.xml"/>
|
- | <p>the content is:</p><br />
| + | </p>
|
- | <pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
| + | <p>
|
- | &lt;plugin name="DITA User Guide" id="dita-userguide" version="1.0" provider-name="DITA"&gt;<br />
| + | <toc id="/org.eclipse.jdt.doc.user/toc.xml"/>
|
- | &lt;extension point="org.eclipse.help.toc"&gt;<br />
| + | </p>
|
- | &lt;toc file="DITA-userguide.xml" primary="true"/&gt;<br />
| + | <p>
|
- | &lt;/extension&gt;<br />
| + | <toc id="/org.eclipse.platform.doc.isv/toc.xml"/>
|
- | &lt;extension point="org.eclipse.help.index"&gt;<br />
| + | </p>
|
- | &lt;index file="index.xml"/&gt;<br />
| + | <p>
|
- | &lt;/extension&gt;<br />
| + | <toc id="/org.eclipse.jdt.doc.isv/toc.xml"/>
|
- | &lt;/plugin&gt;<br />
| + | </p>
|
- | </pre><br />
| + | <p>
|
- | <br />
| + | <toc id="/org.eclipse.pde.doc.user/toc.xml"/>
|
- | <p>The first part of the extensions/tocOrder/toc/@id attribute in<br />
| + | </p>
|
- | helpData.xml is taken from the the id attribute in the plugin.xml file. The<br />
| + | <p>
|
- | second part of the extensions/tocOrder/toc/@id attribute, after the second /,<br />
| + | </hidden>
|
- | is a filename reference. It is taken from the plugin.xml file at<br />
| + | </p>
|
- | plugin/extension/toc/@file attribute.</p><br />
| + | <p>
|
- | <br />
| + | </extensions>
|
- | <p>In other words, the first part, between the first / and the second / is<br />
| + | </p>
|
- | from the id attribute in plugin.xml. The second part is from the file<br />
| + | <p>
|
- | attribute in the toc element in plugin.xml</p><br />
| + | If you have several Dita documents served by the Infocenter, they will
|
- | <br />
| + | appear in the bookmark list in a default order. If you would like to modify
|
- | <p>NB: In helpData.xml, the tocOrder element <strong>MUST</strong> precede<br />
| + | the order, you can use the helpData.xml file to do so. This is done with the
|
- | the hidden element.</p><br />
| + | tocOrder element. For example:
|
- | <br />
| + | </p>
|
- | <h3>Product Banner</h3><br />
| + | <p>
|
- | <br />
| + | <?xml version="1.0" encoding="utf-8"?>
|
- | <p>This feature is optional, a matter of taste or policy. The banner, if<br />
| + | </p>
|
- | activated, appears at the top of every help page, and reduces the display<br />
| + | <p>
|
- | area of the page. It can be used to display such things as logos and customer<br />
| + | <extensions>
|
- | service information. It's a standard html page.</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>Banner configuration is done in a configuration file located in the<br />
| + | <tocOrder>
|
- | platform plugin directory:</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>&lt;eclipse-location&gt;/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin_customization.ini</p><br />
| + | <toc id="/dita-userguide/DITA-userguide.xml"/>
|
- | <br />
| + | </p>
|
- | <p>The basic configuration syntax is:</p><br />
| + | <p>
|
- | <br />
| + | <toc id="/another-doc/DOC-document.xml"/>
|
- | <p>&lt;plugin-name&gt;/&lt;parameter&gt; = &lt;value&gt;</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>To set a banner page that is located in the dita-uguide plugin<br />
| + | </tocOrder>
|
- | directory:</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>org.eclipse.help.base/banner = /dita-userguide/doc/banner.html</p><br />
| + | <hidden>
|
- | <br />
| + | </p>
|
- | <p>In this case, org.eclipse.help.base is the plugin that sets this<br />
| + | <p>
|
- | parameter, banner is the parameter that is being set, dita-userguide<br />
| + | <toc id="/org.eclipse.platform.doc.user/toc.xml"/>
|
- | is the plugin id where the banner page is located (NOT the plugin<br />
| + | </p>
|
- | directory), doc is the directory within the plugin directory where the<br />
| + | <p>
|
- | page is located, and banner.html is the banner page itself.</p><br />
| + | <toc id="/org.eclipse.jdt.doc.user/toc.xml"/>
|
- | <br />
| + | </p>
|
- | <p>As with the TOC configuration, it's important to remember to<br />
| + | <p>
|
- | distinguish between the plugin id and the name of the plugin<br />
| + | <toc id="/org.eclipse.platform.doc.isv/toc.xml"/>
|
- | directory.</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>To set the pixel height of the window where the banner will be<br />
| + | <toc id="/org.eclipse.jdt.doc.isv/toc.xml"/>
|
- | displayed, add this parameter to plugin_customization.ini:</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>org.eclipse.help.base/banner_height = 80</p><br />
| + | <toc id="/org.eclipse.pde.doc.user/toc.xml"/>
|
- | <br />
| + | </p>
|
- | <p>To activate this configuration, shutdown and re-start the<br />
| + | <p>
|
- | Infocenter.</p><br />
| + | </hidden>
|
- | <br />
| + | </p>
|
- | <h3>Home Page</h3><br />
| + | <p>
|
- | <br />
| + | </extensions>
|
- | <p>The home page is displayed when the user clicks on the home icon at<br />
| + | </p>
|
- | the top of the help display. It can be used to explain basic usage of<br />
| + | <p>
|
- | the help system.</p><br />
| + | The content of the id attribute in the above example is not a
|
- | <br />
| + | filename reference. Instead, it is based on information contained in
|
- | <p>To set a home page that is located in the dita-uguide plugin<br />
| + | the Dita document plugin configuration file. This file is named
|
- | directory, add this parameter to plugin_customization.ini:</p><br />
| + | "plugin.xml," and is located in the Dita eclipsehelp output
|
- | <br />
| + | directory. For example, in the Dita User Guide output located at:
|
- | <p>org.eclipse.help.base/help_home = /dita-userguide/doc/help_home.html</p><br />
| + | </p>
|
- | <br />
| + | <p>
|
- | <p>The syntax is the same as for the banner page parameter.</p><br />
| + | <eclipse-location>/eclipse/plugins/dita-ugide/plugin.xml
|
- | <br />
| + | </p>
|
- | <p>To activate this configuration, shutdown and re-start the<br />
| + | <p>
|
- | Infocenter.</p>
| + | the content is:
|
+ | </p>
| ||
+ | <p>
| ||
+ | <?xml version="1.0" encoding="utf-8"?>
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | <plugin name="DITA User Guide" id="dita-userguide" version="1.0" provider-name="DITA">
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | <extension point="org.eclipse.help.toc">
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | <toc file="DITA-userguide.xml" primary="true"/>
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | </extension>
| ||
+ | <extension point="org.eclipse.help.index">
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | <index file="index.xml"/>
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | </extension>
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | </plugin>
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | The first part of the extensions/tocOrder/toc/@id attribute in
| ||
+ | helpData.xml is taken from the the id attribute in the plugin.xml file. The
| ||
+ | second part of the extensions/tocOrder/toc/@id attribute, after the second /,
| ||
+ | is a filename reference. It is taken from the plugin.xml file at
| ||
+ | plugin/extension/toc/@file attribute.
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | In other words, the first part, between the first / and the second / is
| ||
+ | from the id attribute in plugin.xml. The second part is from the file
| ||
+ | attribute in the toc element in plugin.xml
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | NB: In helpData.xml, the tocOrder element <strong>MUST</strong> precede
| ||
+ | the hidden element.
| ||
+ | </p>
| ||
+ | <h3>Product Banner</h3>
| ||
+ | <p>
| ||
+ | This feature is optional, a matter of taste or policy. The banner, if
| ||
+ | activated, appears at the top of every help page, and reduces the display
| ||
+ | area of the page. It can be used to display such things as logos and customer
| ||
+ | service information. It's a standard html page.
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | Banner configuration is done in a configuration file located in the
| ||
+ | platform plugin directory:
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | <eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin_customization.ini
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | The basic configuration syntax is:
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | <plugin-name>/<parameter> = <value>
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | To set a banner page that is located in the dita-uguide plugin
| ||
+ | directory:
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | org.eclipse.help.base/banner = /dita-userguide/doc/banner.html
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | In this case, org.eclipse.help.base is the plugin that sets this
| ||
+ | parameter, banner is the parameter that is being set, dita-userguide
| ||
+ | is the plugin id where the banner page is located (NOT the plugin
| ||
+ | directory), doc is the directory within the plugin directory where the
| ||
+ | page is located, and banner.html is the banner page itself.
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | As with the TOC configuration, it's important to remember to
| ||
+ | distinguish between the plugin id and the name of the plugin
| ||
+ | directory.
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | To set the pixel height of the window where the banner will be
| ||
+ | displayed, add this parameter to plugin_customization.ini:
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | org.eclipse.help.base/banner_height = 80
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | To activate this configuration, shutdown and re-start the
| ||
+ | Infocenter.
| ||
+ | </p>
| ||
+ | <h3>Home Page</h3>
| ||
+ | <p>
| ||
+ | The home page is displayed when the user clicks on the home icon at
| ||
+ | the top of the help display. It can be used to explain basic usage of
| ||
+ | the help system.
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | To set a home page that is located in the dita-uguide plugin
| ||
+ | directory, add this parameter to plugin_customization.ini:
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | org.eclipse.help.base/help_home = dita-userguide/doc/help_home.html
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | The syntax is the same as for the banner page parameter.
| ||
+ | </p>
| ||
+ | <p>
| ||
+ | To activate this configuration, shutdown and re-start the
| ||
+ | Infocenter.
| ||
+ | </p>
| ||
Setting up the Eclipse Help Infocenter for publishing Dita content
Creating a Stand Alone Eclipse Infocenter for Dita
The Dita Open Toolkit offers an actively maintained output for Eclipse Help. One of the features of this help system is that it can be deployed as a stand alone help server.
This feature allows any valid Dita content to be served by a sophisticated and well maintained help system, that is free for personal and commercial use. Eclipse Help rivals commercial products in its stability and feature set.The only cost (so far) that I have seen in deploying this system is that it is designed for Eclipse and Java developers. Setup of the system is not obvious for someone who lives and works outside of the Eclipse universe, due to the Eclipse documentation, which is oriented towards program development. Actual setup for documentation purposes is not difficult.
The purpose of this document is to minimize the pain of Eclipse Help deployment for those wishing to use the Dita Eclipse Help transformation type.
This document is based on deployment of the current Eclipse stable release, 3.3.2, from February 21, 2008. If you use a different release of Eclipse, then file name references given in the following examples may not match your installation.
The Eclipse Platform Runtime Binary Package
The Eclipse Platform Runtime Binary package is available from the
Download the Platform Runtime Binary package that is appropriate for your platform.
Be sure to download the Platform Runtime Binary package, instead of the entire Eclipse development environment. The Platform Runtime Binary package is only around 40M to download, whereas versions of the development environment can be 100M and up.
The Platform Runtime Binary package is distributed as an archive file, and can be unarchived at any suitable location.
Setting Up Your First Dita Document
Render a Dita map and topic content using the "eclipsehelp" transformation type. See the Dita User Guide for instructions on how to run a Dita transformation.
After rendering, the output directory will contain an Eclipse Help plugin. Simply copy the entire output directory to:
<where you installed the Eclipse Platform Runtime Binary package>/eclipse/plugins
so that the copied output directory is beneath the plugins directory. For example, if you were to render the Dita Users' Guide, you could copy the output directory to:
<where you installed the Eclipse Platform Runtime Binary package>/eclipse/plugins/dita-uguide
Starting the Eclipse Infocenter
The Infocenter requires Sun Java 1.5. Start the Infocenter with the following command:
java -classpath <eclipse-location>/eclipse/plugins/org.eclipse.help.base_3.3.1.v20070813_33x.jar org.eclipse.help.standalone.Infocenter -command start -eclipsehome <eclipse-location>/eclipse -port 8081
where <eclipse-location> is the point where you installed the Eclipse Platform Runtime Binary package.
NB: This command is run on a single line.
Point your favorite browser to http://localhost:8081/help/index.jsp
The Infocenter will appear, with bookmarks to the left, and an Eclipse welcome page in the right frame.
The first few bookmarks will be Eclipse platform documentation. At the bottom of the bookmark list, you should see your Dita document.
To shut down the Infocenter, re-run the above command, but with the augument "-command shutdown"
Customization and Branding
When you opened the Infocenter, you probably noticed how the help system was branded as an Eclipse product. To change the branding to suit your Dita documentation requires editing a set of configuration files.
Product Branding
With your favorite text editor, open:
<eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin.properties
Near the top of the file, you will see:
productName=Eclipse Platform
Change this to suit your Dita documentation.
To activate this variable, it may be necessary to erase the Eclipse runtime cache. As of this writing, the only way I know how to do this is to delete the cache by hand. After shutting down the Infocenter, go to:
<eclipse-location>/eclipse/configuration
Delete all directories that start with "org.", being careful NOT to delete the file "config.ini"
Bookmarks
To hide the Eclipse documentation listed in the bookmarks, edit the file:
<eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/helpData.xml
Change the tocOrder tag to "hidden" to hide the Eclipse bookmarks. The file should look like:
<?xml version="1.0" encoding="utf-8"?>
<extensions>
<hidden>
<toc id="/org.eclipse.platform.doc.user/toc.xml"/>
<toc id="/org.eclipse.jdt.doc.user/toc.xml"/>
<toc id="/org.eclipse.platform.doc.isv/toc.xml"/>
<toc id="/org.eclipse.jdt.doc.isv/toc.xml"/>
<toc id="/org.eclipse.pde.doc.user/toc.xml"/>
</hidden>
</extensions>
If you have several Dita documents served by the Infocenter, they will appear in the bookmark list in a default order. If you would like to modify the order, you can use the helpData.xml file to do so. This is done with the tocOrder element. For example:
<?xml version="1.0" encoding="utf-8"?>
<extensions>
<tocOrder>
<toc id="/dita-userguide/DITA-userguide.xml"/>
<toc id="/another-doc/DOC-document.xml"/>
</tocOrder>
<hidden>
<toc id="/org.eclipse.platform.doc.user/toc.xml"/>
<toc id="/org.eclipse.jdt.doc.user/toc.xml"/>
<toc id="/org.eclipse.platform.doc.isv/toc.xml"/>
<toc id="/org.eclipse.jdt.doc.isv/toc.xml"/>
<toc id="/org.eclipse.pde.doc.user/toc.xml"/>
</hidden>
</extensions>
The content of the id attribute in the above example is not a filename reference. Instead, it is based on information contained in the Dita document plugin configuration file. This file is named "plugin.xml," and is located in the Dita eclipsehelp output directory. For example, in the Dita User Guide output located at:
<eclipse-location>/eclipse/plugins/dita-ugide/plugin.xml
the content is:
<?xml version="1.0" encoding="utf-8"?>
<plugin name="DITA User Guide" id="dita-userguide" version="1.0" provider-name="DITA">
<extension point="org.eclipse.help.toc">
<toc file="DITA-userguide.xml" primary="true"/>
</extension> <extension point="org.eclipse.help.index">
<index file="index.xml"/>
</extension>
</plugin>
The first part of the extensions/tocOrder/toc/@id attribute in helpData.xml is taken from the the id attribute in the plugin.xml file. The second part of the extensions/tocOrder/toc/@id attribute, after the second /, is a filename reference. It is taken from the plugin.xml file at plugin/extension/toc/@file attribute.
In other words, the first part, between the first / and the second / is from the id attribute in plugin.xml. The second part is from the file attribute in the toc element in plugin.xml
NB: In helpData.xml, the tocOrder element MUST precede the hidden element.
Product Banner
This feature is optional, a matter of taste or policy. The banner, if activated, appears at the top of every help page, and reduces the display area of the page. It can be used to display such things as logos and customer service information. It's a standard html page.
Banner configuration is done in a configuration file located in the platform plugin directory:
<eclipse-location>/eclipse/plugins/org.eclipse.platform_3.3.3.r33x_r20080129/plugin_customization.ini
The basic configuration syntax is:
<plugin-name>/<parameter> = <value>
To set a banner page that is located in the dita-uguide plugin directory:
org.eclipse.help.base/banner = /dita-userguide/doc/banner.html
In this case, org.eclipse.help.base is the plugin that sets this parameter, banner is the parameter that is being set, dita-userguide is the plugin id where the banner page is located (NOT the plugin directory), doc is the directory within the plugin directory where the page is located, and banner.html is the banner page itself.
As with the TOC configuration, it's important to remember to distinguish between the plugin id and the name of the plugin directory.
To set the pixel height of the window where the banner will be displayed, add this parameter to plugin_customization.ini:
org.eclipse.help.base/banner_height = 80
To activate this configuration, shutdown and re-start the Infocenter.
Home Page
The home page is displayed when the user clicks on the home icon at the top of the help display. It can be used to explain basic usage of the help system.
To set a home page that is located in the dita-uguide plugin directory, add this parameter to plugin_customization.ini:
org.eclipse.help.base/help_home = dita-userguide/doc/help_home.html
The syntax is the same as for the banner page parameter.
To activate this configuration, shutdown and re-start the Infocenter.