Diff for An infocenter product plugin cookbook
Wed, 2010-04-14 19:10 by bob_beims | Wed, 2010-04-14 19:12 by bob_beims | ||
---|---|---|---|
next diff > | |||
Changes to Body | |||
Line 28 | Line 28 | ||
</ul>
| </ul>
| ||
</div>
| </div>
| ||
- | <p>
| ||
- |
| ||
- | </p>
| ||
<h2><a name="Background_related_information" title="Background_related_information"></a><a name="_Background_related_information" title="_Background_related_information"></a> Background / related information </h2>
| <h2><a name="Background_related_information" title="Background_related_information"></a><a name="_Background_related_information" title="_Background_related_information"></a> Background / related information </h2>
| ||
<ul>
| <ul>
| ||
Line 42 | Line 39 | ||
</li>
| </li>
| ||
</ul>
| </ul>
| ||
- | <p>
| ||
- |
| ||
- | </p>
| ||
<h1><a name="Creating_a_product_plugin_to_con" title="Creating_a_product_plugin_to_con"></a><a name="_Creating_a_product_plugin_to_co" title="_Creating_a_product_plugin_to_co"></a> <strong>Creating a product plugin to contain all customizations</strong> </h1>
| <h1><a name="Creating_a_product_plugin_to_con" title="Creating_a_product_plugin_to_con"></a><a name="_Creating_a_product_plugin_to_co" title="_Creating_a_product_plugin_to_co"></a> <strong>Creating a product plugin to contain all customizations</strong> </h1>
| ||
<h2><a name="Create_a_plugin_project" title="Create_a_plugin_project"></a><a name="Create_a_plugin_project_" title="Create_a_plugin_project_"></a> Create a plugin project: </h2>
| <h2><a name="Create_a_plugin_project" title="Create_a_plugin_project"></a><a name="Create_a_plugin_project_" title="Create_a_plugin_project_"></a> Create a plugin project: </h2>
| ||
Line 71 | Line 65 | ||
<p>
| <p>
| ||
You've now created a basic plugin package with a single extension point (a ToC) and some example content; this extension point and content will probably be deleted later (unless you're planning on providing a custom ToC and perhaps a splash page with this plugin).
| You've now created a basic plugin package with a single extension point (a ToC) and some example content; this extension point and content will probably be deleted later (unless you're planning on providing a custom ToC and perhaps a splash page with this plugin).
| ||
- | </p>
| ||
- | <p>
| ||
- |
| ||
</p>
| </p>
| ||
<h2><a name="Add_look_n_feel_customizations_t" title="Add_look_n_feel_customizations_t"></a> Add look-n-feel customizations to the plugin: </h2>
| <h2><a name="Add_look_n_feel_customizations_t" title="Add_look_n_feel_customizations_t"></a> Add look-n-feel customizations to the plugin: </h2>
| ||
Line 118 | Line 109 | ||
</li>
| </li>
| ||
</ol>
| </ol>
| ||
- | <p>
| ||
- |
| ||
- | </p>
| ||
You've now set up a product plugin that tells Eclipse to find the plugin_customization.ini file for the helpApplication within this plugin ... so now you need to create the plugin_customization.ini file itself.
| You've now set up a product plugin that tells Eclipse to find the plugin_customization.ini file for the helpApplication within this plugin ... so now you need to create the plugin_customization.ini file itself.
| ||
<p>
| <p>
| ||
Line 135 | Line 123 | ||
</ul>
| </ul>
| ||
<p>
| <p>
| ||
- | Another example:
| + | Another example:
|
</p>
| </p>
| ||
<ul>
| <ul>
| ||
Line 141 | Line 129 | ||
</li>
| </li>
| ||
</ul>
| </ul>
| ||
- | <p>
| ||
- |
| ||
- | </p>
| ||
Refer to <a href="http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/guide/ua_help_infocenter_preferences.htm" target="_top">Infocenter customization</a> for a list of property defaults that you might want to override.
| Refer to <a href="http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/guide/ua_help_infocenter_preferences.htm" target="_top">Infocenter customization</a> for a list of property defaults that you might want to override.
| ||
<p>
| <p>
| ||
Line 164 | Line 149 | ||
</li>
| </li>
| ||
</ul>
| </ul>
| ||
- | <p>
| ||
- |
| ||
- | </p>
| ||
<h1><a name="Export_the_plugin" title="Export_the_plugin"></a><a name="_Export_the_plugin_" title="_Export_the_plugin_"></a> <strong>Export the plugin</strong> </h1>
| <h1><a name="Export_the_plugin" title="Export_the_plugin"></a><a name="_Export_the_plugin_" title="_Export_the_plugin_"></a> <strong>Export the plugin</strong> </h1>
| ||
<ol>
| <ol>
| ||
Line 196 | Line 178 | ||
</li>
| </li>
| ||
</ol>
| </ol>
| ||
- | <p>
| ||
- |
| ||
- | </p>
| ||
<h1><a name="Installing_the_customization_plu" title="Installing_the_customization_plu"></a><a name="_Installing_the_customization_pl" title="_Installing_the_customization_pl"></a> <strong>Installing the customization plugin</strong> </h1>
| <h1><a name="Installing_the_customization_plu" title="Installing_the_customization_plu"></a><a name="_Installing_the_customization_pl" title="_Installing_the_customization_pl"></a> <strong>Installing the customization plugin</strong> </h1>
| ||
<ol>
| <ol>
| ||
Line 204 | Line 183 | ||
</li>
| </li>
| ||
</ol>
| </ol>
| ||
- | <p>
| ||
- |
| ||
- | </p>
| ||
<h1><a name="Invoking_the_customization_plugi" title="Invoking_the_customization_plugi"></a><a name="_Invoking_the_customization_plug" title="_Invoking_the_customization_plug"></a> <strong>Invoking the customization plugin</strong> </h1>
| <h1><a name="Invoking_the_customization_plugi" title="Invoking_the_customization_plugi"></a><a name="_Invoking_the_customization_plug" title="_Invoking_the_customization_plug"></a> <strong>Invoking the customization plugin</strong> </h1>
| ||
<div class="patternTopic">
| <div class="patternTopic">
| ||
Line 212 | Line 188 | ||
</div>
| </div>
| ||
<div class="patternTopic">
| <div class="patternTopic">
| ||
- | + | </div>
| |
+ | <blockquote>
| ||
+ | </blockquote>
| ||
+ | <div class="patternTopic">
| ||
+ | <pre>
| ||
+ | -product net.freescale.ssds.ic-cust
| ||
+ | </pre>
| ||
</div>
| </div>
| ||
<blockquote>
| <blockquote>
| ||
<div class="patternTopic">
| <div class="patternTopic">
| ||
- | <pre>
| ||
- | -product net.freescale.ssds.ic-cust
| ||
- | </pre>
| ||
</div>
| </div>
| ||
</blockquote>
| </blockquote>
|
Revision of Wed, 2010-04-14 19:12:
An infocenter product plugin cookbook
EclipseHelp Standalone Infocenter Customization
This page contains how-to information about creating a plugin to customize a standalone infocenter without modifying the base files of the Eclipse installation.
- Creating a product plugin to contain all customizations
- Export the plugin
- Installing the customization plugin
- Invoking the customization plugin
Background / related information
- help.eclipse.org :: Infocenter customization
- help.eclipse.org :: Help system customization
- dita.xml.org :: Setting up an Infocenter for publishing DITA content
- dita-users :: Producing standalone Eclipse Help
Creating a product plugin to contain all customizations
Create a plugin project:
- launch the Eclipse IDE (it is suggested that you use the same or later version of the IDE as the version you're using for the infocenter runtime)
- select File > New > Project and select Plug-in Project
- uncheck the "Create Java Project" check box
- give the project a name (this name will be used as the initial plugin ID, but can be changed later)
- click Next
- edit the Properties "Name" field to provide a meaningful, human readable, name to the plugin
- enter "Freescale Semiconductor, Inc." in the "Provider" field
- click Next
- select the "Plug-in with sample help content" template
- click Finish
You've now created a basic plugin package with a single extension point (a ToC) and some example content; this extension point and content will probably be deleted later (unless you're planning on providing a custom ToC and perhaps a splash page with this plugin).
Add look-n-feel customizations to the plugin:
- select the "Extensions" tab
- click "Add"
- uncheck "Show only extension points from the required plugins"
- type "runtime.products" in the "Extension Point filter" box
- double-click on the "org.eclipse.core.runtime.products"
- click "No" in the "New plugin dependency" dialog that will pop up
- enter an ID and Name for this extension
- the extension ID will be appended to the plugin ID as the fully-qualified product identifier in the command line used to start the infocenter
- the extension Name is the string that will be displayed in the title of browser windows for the infocenter
- right-click on the plugin extension you just created
- select "New > product"
- delete the text that was automatically generated for "application" and replace it with org.eclipse.help.base.helpApplication
- right-click on the product node you just named
- select "New > property"
- delete the text that was automatically generated for "name" and "value" and replace them with
- name = preferenceCustomization
- value = plugin_customization.ini
- save the project
plugin_customization.ini
The plugin_customization.ini file is a text file that defines preference overrides for the default Eclipse installation. Entries in the text file are key/value pairs, where keys are qualified by the id of the plugin where the default value is found. For example, the default value for the banner property is org.eclipse.help.webapp/advanced/banner.html and thus that default may be overridden to specify the banner.html file inside your customization plugin via the key/value
- org.eclipse.help.base/banner = /<your plugin id here>/banner.html
Another example:
- org.eclipse.help.base/windowTitlePrefix = false will turn off the "Help - " prefix normally displayed in the title of browser windows
A good starting point might be to copy the plugin_customization.ini file from the org.eclipse.platform_<version.qualifier> plugin of your Eclipse IDE, remove those key/value pairs you're not going to override, and modify the others.
other customization plugin content
Other items that you might include in your plugin are:- a banner.html file
- graphic files referenced by banner.html or other UI elements you're overriding
- CSS files referenced by banner.html or the org.eclipse.help.base/topic_css or org.eclipse.help.base/nav_css properties
- a helpData.xml file to show/hide and order the ToC entries
Export the plugin
- switch to the "Overview" tab
- make sure the "Version" string is set appropriately (note that a ".qualifier" suffix will be replaced with a date/time stamp at build time)
- switch to the "Build" tab
- make sure all appropriate assets are checked in the "Binary Build" window (you won't be doing a source build)
- right-click on the top-level plugin folder in the Package Explorer
- select "Export..."
- select "Plug-in Development > Deployable plug-ins and fragments"
- click Next
- check the box next to your plugin
- use the Browse button to specify where the plugin should be saved
- click the Options tab
- make sure the "Package plug-ins as individual JAR archives" is selected, and "Export source" is not selected
- click Finish
Installing the customization plugin
- drop the .jar into the <eclipse home>/plugins or <eclipse home>/dropins directory
Invoking the customization plugin
When starting your infocenter, add -product <your plugin ID>.<your product extension ID> to the command line. For example, since the example plugin attached below has a plugin ID of net.freescale.ssds and a product extension ID of ic-cust the command line option to invoke it is-product net.freescale.ssds.ic-cust