The OpenOffice.org Eclipse integration development uses some interesting features. The most important are detailed below: running a new Eclipse instance for debug sessions and update site mechanism for the plugins installation.
To debug and test during the development stage it is possible to launch a new Eclipse instance as a new application to debug. First, keep in mind, that there are often different problems in real installations tests. This kind of test is not sufficient to validate a release of the plugins. To run a new Eclipse instance select Run > Run As > Eclipse Application. The developed plugins running in this instance can be debugged like any other Java program in Eclipse. This is often useful to track errors.
Before running a new Eclipse instance, be sure to have updated
the UnoTypesGetter.jar
using the internals target of the
org.openoffice.ide.eclipse.core/build/build.xml
file. Running this
target may fail if the javadoc binary is not contained in the system
path or if the JAVA_HOME
environment variable is not defined. This
target should be run with the same arguments as the update site
generation target (see next section).
In order to deliver or test the plugins in a normal Eclipse installation, it is necessary to generate an update site containing the plugins to install or update. Eclipse provides update site and features projects, but these should not be used for the OpenOffice.org Eclipse integration. To generate the update site use the build project as follow :
Open the Ant view
Add the org.openoffice.ide.eclipse.build/build.xml
file to the
Ant view
Right click on the added file and select the Run As > External Tools... menu
Create a new Ant build
Select the build file
Add -Dopenoffice.home=/path/to/you/ooo
-Declipse.home=/path/to/your/eclipse
in the arguments. Do not forget
to place the path inside quotes on windows.
Run the ant build.
This script generates a site directory and
ooeclipseintegration_site.zip
file which are the update site in an
uncompressed and compressed form. To generate a debug update site, just
add the -Ddebug=true
argument to the ant launch configuration : this is
useful when testing the plugins on a fresh Eclipse installation.