Difference between revisions of "OpenOffice NetBeans Integration"
(→Things to be done)
|Line 170:||Line 170:|
* [[OpenOffice_NetBeans_Integration_QA|Schedule for OpenOffice.org NetBeans Integration QA ]]
* [[OpenOffice_NetBeans_Integration_QA|Schedule for OpenOffice.org NetBeans Integration QA ]]
= Things to be done =
= Things to be done =
Revision as of 13:37, 18 September 2007
- 1 Overview
- 2 Download and Installation
- 3 Features
- 4 Working with the plugin
- 5 Releases
- 6 Planned Features
- 7 Quality Assurance
- 8 Localization
- 9 Things to be done
- 10 Feedback
The OpenOffice.org API plugin for NetBeans simplifies the development of OpenOffice.org extensions. You can use the OpenOffice.org API to program OpenOffice.org, and automate remote or in process tasks extend OpenOffice.org with completely new functionality. The OpenOffice.org API plugin for NetBeans simplifies accessing and using of the API in new projects and simplifies the task of creating complete OpenOffice.org extension packages (comparable to the NetBeans plugin modules).
Download and Installation
Download the latest version from within NetBeans by clicking on Tools - Update Center. See that "Netbeans Update Center" is selected in the list of available centers and click Next. You can find the plugin in the Features section as "OpenOffice.org API Plugin". Install it and try it out! The configuration is self explanatory, for detailed information see Configuration.
Overview of the features included in the current plugin.
All project types create working code. Once the wizard is finished, a working compilable project is created. It may not do anything, but it can be used in OpenOffice.org from the beginning.
This project type creates an adapted J2SE client application project with additional support of the simple UNO bootstrap feature. To enable this, some pre-compiled glue code is bundled with the client application. The result is a portable jar file that bootstraps OpenOffice.org on any supported OS.
This project type creates an adapted J2SE class library project with special support for a UNO component library and an office extension package. The wizard collects the necessary information for new Calc built-in functions and abstracts from the underlying UNO technology.
This project type creates an adapted J2SE class library project with special support for a UNO component library and an OpenOffice.org extension package. The wizard collects information about services and additional optional interfaces which should be implemented. Additional IDL types can also be defined. A complete code skeleton is generated, with the component helper functions and the default interface methods already implemented.
This project type creates an adapted J2SE class library project with special support for a UNO component library and an OpenOffice.org extension package. The wizard collects the necessary information for an OpenOffice.org Add-On component and generates an Add-On specific code skeleton.
- xcu file type
Create an empty xcu file type. The files are recognized in NetBeans and syntax highlighting is supported.
- xcs file type
Create an empty xcs file type. The files are recognized in NetBeans and syntax highlighting is supported.
- UNO idl file type
You can use a file type wizard to create idl files. In the first step, you must select the name location and UNO type (e.g. Service or Interface). You can add additional information in the second step. When an interface is created, the second step asks about the functions that the interface should contain. A complete working idl file is created.
Create, deploy and debug
These are actions that are available in the context menu of an extension project in the "Project" view.
- Create OXT
If necessary, your code is compiled. The resulting jar file is packed into an OXT file, together with other necessary files such as configuration files, a manifest file, and images. The OXT file is located in the "dist" directory of the project.
- Deploy OpenOffice.org Extension
If necessary, "Create OXT" is executed. The resulting OXT file is registered inside the user installation of OpenOffice.org.
- Debug Extension in Target OpenOffice.org
If necessary, "Create OXT" is executed. The resulting OXT file is registered in a temporary user installation of OpenOffice.org, which is located in the build directory of the project. (Cleaning of the project removes the user installation again.) Then OpenOffice.org is started with this user installation and the action that triggers the registered extension must be done in OpenOffice.org. Execution stops at any breakpoints added to the code of the extension and debugging can start from there.
- External Jars
Additional external jars that are used in an extension are automatically copied into the OXT file and added to the extension's classpath. A registered extension in OpenOffice.org can still use the functionality provided there. The jars can be added to the project as a single jar or as part of a NetBeans library. Note: All the jars from a library will be added to the OXT file, independent from their usage in the extension.
Find here links to the specifications of the plugin on the api.openoffice.org page.
Working with the plugin
The following section describes how you can work with the plugin and describes the requirements because the plugin make use of some external stuff provided by an office and the OpenOffice.org SDK.
The plugin works only in combination with OpenOffice.org and an appropriate OpenOffice.org Software Development Kit (SDK).
- OpenOffice.org 2.0.4 or StarOffice 8 Product Update 4 or higher versions of both programs
- OpenOffice.org Software Development Kit (SDK) 2.0.4 or a higher version
For the Add-on wizard you must have the latest version of the uno-skeletonmaker (comes with OpenOffice.org SDK 2.2.0) and you can download a pre-compiled binary from the file section of the API project (Linux-x86, Solaris-Sparc, Solaris-x86, Windows)
Before you can use the new project types you must configure the plugin because it needs an installed OpenOffice.org and OpenOffice.org SDK.
The current version of the plugin asks during the installation for an OpenOffice.org and OpenOffice.org SDK installation. You also configure or change both programs later. Note: If you change the OpenOffice.org or OpenOffice.org SDK installation, these changes are effective for newly created projects only. This will be changed in the future, and you will be asked if you want accept these changes for existing projects.
For changing the office and SDK installation please choose
- Tools -> Options -> Miscellaneous -> StarOffice/OpenOffice.org Extensions
and select a valid OpenOffice.org and OpenOffice.org SDK installation.
The configuration step automatically installs a new OpenOffice.org library which can be used in other projects to support the OpenOffice.org API. Including this library in your own projects enables context sensitive help and code completion.
Note: on Debian/Ubuntu, the OpenOffice.org installation directory is
/usr/lib/openoffice/. For other *nix platforms the location may vary, but you can find the location by inspecting the shell script
/usr/bin/ooffice to see where the
ooqstart executable is in your installation.
Working with new Project Types
The plugin integrates four new project types under the category StarOffice/OpenOffice.org:
- StarOffice/OpenOffice.org Calc Add-On
- StarOffice/OpenOffice.org Calc Add-Ins
- StarOffice/OpenOffice.org Client Application
- StarOffice/OpenOffice.org Component
The wizards will collect the necessary information to create the new projects and should follow the NetBeans philosophy. You can simply choose
- File -> New Project -> StarOffice/OpenOffice.org -> <project_type>
For more details about the project types please take a look at
- OpenOffice.org UNO Client Application Project Type
- OpenOffice.org Calc Add-In Project Type
- OpenOffice.org Component Project Type
- OpenOffice.org Add-On Project Type
Known Problems and Missing Features
- Context sensitive help does not work on Linux (Solaris not yet tested), even the javadoc generated Java UNO runtime reference documentation does not work on Linux. Under Windows both work as expected.
- The integrated update center module does not work on Unix systems (known bug 72960 in NetBeans which is fixed in NetBeans 6.0). Workaround is to install NetBeans locally where you have write access.
- The backward compatibility mode for Calc Add-Ins creates still an .oxt extension package. This of course makes no sense for older OpenOffice.org versions because this file extension was first introduced in OO.org 2.0.4. Please simply rename it to .uno.pkg
- The selection of a category for Calc Add-ins has currently no effect. New function will always be in the category Add-In. The corresponding issue 77984 is already fixed and will be available in OO.org 2.3.
- (LINUX) After configuring Netbeans (5.5) correctly, you may not be able to start a newly created application. An error "com.sun.star.comp.helper.BootstrapException: no office executable found!" occurs. Follow the steps described below to fix that problem. Assuming you have created a new OO Client Project using the New Project Wizard.
- Edit the project properties
- Libraries : Add Jar/Folder : /usr/lib/openoffice/sdk/classes (for Debian users, location may vary for other distributions) Provide the directory, where the SDK "com" classes directory can be found.
- Run : MainClass=com.sun.star.lib.loader.Loader (Yes, the main class is the loader)
- Run : Arguments=org.openoffice.OfficeUNOClientApp (the first argument is the main class)
- VM Options=-Dcom.sun.star.lib.loader.unopath="/usr/lib/openoffice/program" (Tell the Java machine where to find the OO stuff)
- Rebuild and run !
|Release Version||Planned Release Date||Release Date||Planned Features|
- Detailed download statistics can be found here
The focus is on creating new wizards for various tasks plus common basic functionality. The main programming language is Java. Support for C++ is also planned and depends on the C++ support in NetBeans which will be available at least for NetBeans 6.0. The planned feature list is not final and more specialized wizards for other service provider interfaces (SPI) are coming in the future.
New Project Types
- OpenOffice.org Scripting Project Type
This new project type will create an adapted J2SE class library project with special support for OpenOffice.org scripting. It should provide you the possibility to import scripts from OpenOffice.org and open documents, edit, change and build these scripts, debug them and export them back (currently the support is planned for Java scripts only).
- OpenOffice.org SmartTag Project Type
This new project type will simplify the development of SmartTags for the OpenOffice.org Writer application.
- OpenOffice.org API Library API Wrapper Project Type
This new project type should create a Library Wrapper Module to support simple usage of the OpenOffice.org API in your own projects. It bundles the necessary API jar files from OpenOffice.org in the library and in client applications. This of course is necessary to make use of the OpenOffice.org API in clients running on machines where no OpenOffice.org is installed and where the communication with OpenOffice.org is made over a remote socket connection.
- Editor for xcu files
This must be defined in detail but we can think of a special editor for OpenOffice .org configuration files.
If you find bugs please submit a new issue in the category sdk and the subcomponent netbeans-integration
Things to be done
We will continuously extend and improve the plugin in the future and your feedback is welcome and highly appreciated. We would like to invite you to discuss it on email@example.com (Note: you have to be subscribed on the mailing list).