OpenOffice.org API Plugin for NetBeans- a look under the hood Steffen Grund Software Engineer Sun Microsystems GmbH 1
Abstract The plugin story The red dot problem Registering Extensions Extension Properties Client Applications The Plugin update Definitely Forbidden Questions & Answers & Preview
OpenOffice.org API Plugin basics Created to simplify developing client applications and Extensions for OpenOffice.org in Java. Project wizards AddOn, Calc AddIn and Component for Extensions Client Application File Wizards Configuration files (xcs, xcu files) IDL files Java implementations (of IDL files) Context Menus, Configuration, etc.
The success story More than 40% of the Java extensions are created with help of the Plugin More than 2000 downloads of the Plugin per month
The red dot problem IDL files in projects are compiled to class files and build a jar file (in the dist folder of the project) This jar must be added to the library files of the project (done by the plugin) This produces error indications when the project is cleaned A new build works!
The red dot problem Demonstration
Registering Extensions Registering uses two defined static method names: __getComponentFactory(String implName) __writeRegistryServiceInfo(XRegistryKey key) In projects created with the plugin, this is done by the CentralRegistrationClass CentralRegistrationClass delegates registering to classes given in the project-uno.properties
Registering Extensions Demonstration
Extension Properties Integrated in NetBeans Display Properties Display Name License Icon … Version Properties Identifier Version Number ...
Extension Properties OXT folder Bundle all important files for an extension in one folder in the Project view OpenOffice.org Registry files (xcu, xcs) Images, licenses, descriptions description.xml uno-extension-manifest.xml
Extension Properties Demonstration
Client Applications Inside NetBeans: com.sun.star.lib.loader.unopath Outside NetBeans: recognition of OpenOffice.org installed with platform support
The Plugin update A new version of the Plugin is installed Update important project files Overwrite build-uno.xml Extend project-uno.properties ... (nothing else right now, but in the future) Reasons Bugfixes New features need updated files
The Plugin update Demonstration
Definitely Forbidden You will get trouble when you: Rename your project once it is finished Rename directories in project-uno.propertes file (all properties ending with “.dir”) Use another source directory instead of the default (although additional directories are ok)
EXAMPLE TEXT Inside NetBeans: com.sun.star.lib.loader.unopath Outside NetBeans: recognition of OpenOffice.org installed with platform support
Questions & Answers & Preview
NetBeans plug-in for OpenOffice.org - a look under the hood Steffen Grund Steffen.Grund@sun.com 18