Building a plug-in extension
In Eclipse PDE Manifest Editor, use Build to specify the build configuration, including the following items:
*Runtime Information
Defines the libraries, the source folders to compile into each library, and the compilation order.
*Binary Build
Selects the files and folders to include in the binary build.
*Source Build
Selects the files and folders to include in the source build. Source Build is not typically required. Source Build uses the org.eclipse.pde.core.source extension point that allows the PDE to find source archives for libraries in other Eclipse plug-ins.
How to specify a build configuration
1 In PDE Manifest Editor, choose Build. Build Configuration appears. Figure 22‑23 shows Build Configuration.
Figure 22‑23 Build Configuration
2 In Runtime Information, choose Add Library. Add Entry appears.
3 In Add Entry, type the new library name, as shown in Figure 22‑24, or select a run-time library name from the list.
Figure 22‑24 Adding a library name
Choose OK. The new library name appears in Runtime Information.
4 To change the compilation order of a library, change its position in the list. In Runtime Information, select the library. Then, choose Up or Down. The example in Figure 22‑25 shows mylibrary.jar selected and Down enabled.
Figure 22‑25 Changing the compilation order of a library
5 To add a folder to a library, choose Add Folder.
6 In New Source Folder Select a folder such as src, as shown in Figure 22‑26.
Figure 22‑26 Specifying a new source folder
Choose OK. Runtime Information appears, as shown in Figure 22‑27.
Figure 22‑27 Viewing Runtime Information
7 In Binary Build, include a folder in the binary build by selecting the folder. Figure 22‑28 shows the icons folder selected.
Figure 22‑28 Including a folder in Binary Build
8 From the Eclipse menu, choose ProjectBuild All, to build a project.
Alternatively, you can choose ProjectBuild Automatically to build the project continuously as you make changes to the code.
Generating an Ant build script
The Eclipse PDE can generate an Ant build script to compile plug-in code, based on the settings in the build.properties file. The generated script is an XML file in which the elements are the required tasks for the build operation. The Ant build tool compiles the project, using the specified Java compiler.
How to generate an Ant build script
In Package Explorer, right-click the project’s plugin.xml file and choose Plug‑in ToolsCreate Ant Build File. The PDE creates an Ant script file, build.xml, in the project folder.
Testing a plug-in extension
You can launch an instance of the run-time workbench to test and debug the plug-in extension.
How to launch a run-time workbench
1 In PDE Manifest Editor, choose Overview. Overview appears as shown in Figure 22‑29.
Figure 22‑29 Viewing Overview showing testing and debugging options
2 In Testing, choose Launch an Eclipse application. Eclipse launches the run‑time workbench.
In the report item extension example, Report Design—Eclipse SDK appears. In the run-time workbench, create a new report design project to use the report label extension.