VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/docsrc/dev_ref/workingwithdocplugin.dita@ 99507

最後變更 在這個檔案從99507是 98584,由 vboxsync 提交於 2 年 前

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 7.1 KB
 
1<?xml version="1.0" encoding="utf-8"?>
2<!-- This file is part of the DITA Open Toolkit project hosted on
3 Sourceforge.net. See the accompanying license.txt file for
4 applicable licenses.-->
5 <!--
6 | (C) Copyright IBM Corporation 2005 - 2006. All Rights Reserved.
7 *-->
8<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
9 "..\..\dtd\task.dtd">
10<task id="integratingwithwtp" xml:lang="en-us">
11<title>Creating Eclipse help from within Eclipse</title>
12<shortdesc>This topic explains how to create an Eclipse help documentation
13plug-in from within the Eclipse platform. This process allows you
14to set up repeatable builds directly within Eclipse, which may already
15be familiar to many developers working within Eclipse. The topic was
16originally written based on Eclipse 3.3, but much of the information
17still applies.</shortdesc>
18<taskbody>
19<context>You can use a template to develop documentation plug-in with DITA in Eclipse PDE and use
20 DITA-OT <keyword keyref="release.version"/> to build and pack the final plug-in. When you want to develop a documentation
21 plug-in with DITA in Eclipse, you cannot use the previous releases of DITA-OT in Eclipse to
22 transform DITA to HTML. Though previous releases of DITA-OT support the feature to transform
23 DITA files to Eclipse documentation plug-in, they are not integrated with Eclipse. With
24 DITA-OT <keyword keyref="release.version"/> integrated with WPT, you can develop document plug-ins with DITA in Eclipse PDE
25 and build and pack the final plug-in by taking the following steps.</context>
26<steps>
27<step><cmd rev="r4">Create a new PDE project in Eclipse, and apply the DITA
28template to the project by following the wizard.</cmd><info><image href="images/createlpluginproject.jpg"
29placement="break"><alt>Start Eclipse and create a new plug-in project</alt>
30</image></info></step>
31<step id="step2"><cmd rev="r3">Set the source directory, the main ditamap file, the output directory (default value
32 is root directory of project), css storage directory (used to contain<filepath>
33 common.css</filepath>, <filepath>commonltr.css</filepath>, and
34 <filepath>commonrtl.css</filepath>), user customized .css file name, and conditional
35 processing ditaval file in the wizard. <uicontrol>Use root as output directory</uicontrol>
36 is selected as the default.</cmd><info>You can also clear <uicontrol>Use root as output
37directory</uicontrol> and specify another output directory. <fig>
38<image href="images/specifyoutputdir.JPG" placement="break"><alt>Set directories</alt>
39</image>
40</fig><fig>
41<image href="images/newdirectory.JPG" placement="break"><alt>Specify another directory</alt>
42</image>
43</fig></info></step>
44<step><cmd>Create DITA files in the source directory and a ditamap to include
45the topic files that you created.</cmd></step>
46<step importance="optional"><cmd>Import the DITA files into the <filepath>src</filepath> directory
47of the DITA plug-in project you just created.</cmd>
48<substeps>
49<substep><cmd>Right-click a directory that you want to put the imported files and select <menucascade>
50 <uicontrol>Import</uicontrol>
51 <uicontrol>File system</uicontrol>
52 </menucascade>. </cmd><info><fig>
53<image href="images/filesys.jpg" placement="break"><alt>Select an import file source</alt>
54</image>
55</fig></info></substep>
56<substep><cmd>Select the directory under which you put the DITA files.</cmd>
57<info><fig>
58<image href="images/setdirectory.jpg" placement="break"><alt>Select a directory</alt>
59</image>
60</fig></info></substep>
61<substep><cmd>Click Finish after you selected the DITA files under the specified
62directory. The DITA files are then imported to your DITA project.</cmd></substep>
63</substeps>
64</step>
65<step><cmd>Right click <filepath>build.xml</filepath>, select <menucascade><uicontrol>Run As</uicontrol>
66 <uicontrol>Ant Build</uicontrol></menucascade>.</cmd>
67 <info><note importance="high">If you're using Oracle JDK, please download and use the latest Xalan. The
68 Xalan shipped with Oracle JDK has some issue that will cause the build failure. You can
69 use the latest Xalan by selecting <uicontrol>ANT Build ...</uicontrol> and include the
70 all of Xalan's jar files in Classpath.</note></info>
71<info>After the transformation, the output is in the output directory set in
72 <filepath>build.xml</filepath>. Refresh the project after the build is successful.<fig>
73 <image href="images/runasant.jpg" placement="break">
74 <alt>Run as Ant build</alt>
75 </image>
76 </fig><fig>
77 <image href="images/classpath.jpg" placement="break">
78 <alt>Set the Classpath</alt>
79 </image>
80 </fig></info></step>
81<step><cmd>Edit the plug-in description of the property file <filepath>MANITEST.MF</filepath> in the
82 plug-in editor after you run the Ant build successfully. </cmd>
83<substeps>
84<substep><cmd>Click <filepath>MANITEST.MF</filepath> to go to the <wintitle>Overview page</wintitle>.</cmd><info><fig>
85<image href="images/overview.jpg" placement="break"><alt>Overview</alt></image>
86</fig></info></substep>
87<substep><cmd>Edit Dependencies to include <codeph>org.eclipse.help</codeph>.</cmd><info><fig>
88<image href="images/org.jpg" placement="break"><alt>Edit Dependencies</alt></image>
89</fig></info></substep>
90<substep><cmd>Edit Extensions to add <codeph>org.eclipse.help.toc</codeph>; right click the added
91 <codeph>org.eclipse.help.toc</codeph>, and select <menucascade>
92 <uicontrol>New</uicontrol><uicontrol>toc</uicontrol>
93 </menucascade>.</cmd><info><fig>
94<image href="images/toc.jpg" placement="break"><alt>Edit Extensions</alt></image>
95</fig></info></substep>
96<substep><cmd>Edit the Build Configuration to include the out directory or
97the directory you specified in <xref href="#integratingwithwtp/step2"><!--Step 2--></xref>.</cmd>
98<info><fig>
99<image href="images/buildout.JPG" placement="break"><alt>Edit Build Configuration</alt>
100</image>
101</fig></info></substep>
102<substep rev="r3"><cmd>Save the changes you made to the property file MANITEST.MF.</cmd>
103</substep>
104</substeps>
105</step>
106<step><cmd>Export the output to a documentation plug-in. </cmd><info><note>build.xml
107can be customized to meet the requirement of headless build.</note></info>
108<substeps>
109<substep><cmd>Select <menucascade>
110 <uicontrol>File</uicontrol>
111 <uicontrol rev="r3">Export</uicontrol>
112 </menucascade>; select <uicontrol>Deployable plug-ins and fragments</uicontrol> and
113 click <uicontrol>Next</uicontrol>.</cmd>
114<info><fig>
115<image href="images/export.jpg" placement="break"><alt>Export a plug-in</alt></image>
116</fig></info></substep>
117<substep><cmd>Select the plug-in you want to export and specify a directory
118under which you want to put the plug-in package.</cmd><info><image href="images/selectplugin.jpg"
119placement="break"><alt>Select a plug-in and specify the export destination</alt>
120</image></info></substep>
121<substep><cmd>Click <uicontrol>Finish</uicontrol> to export the plug-in package.</cmd>
122</substep>
123</substeps>
124</step>
125</steps>
126</taskbody>
127</task>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette