![]() ![]() Set "Designer" as category for the Action and add the action at the end of the Format menu. Select an Always Enabled action and proceed to the next step. Select the main package of your project, right click and add a new Action class.Ī wizard to create Action starts. Even if our plug-in does nothing yet, you can see the it in the list of installed plugin in the plugin manager (Tools → Plugins).Ĭlose iReport and let's back to the IDE. Run your project (with the Rub Main Project button on the tool bar). ![]() myplugin) and select the checkbox to Generate the XML layer. Set the option to make your plugin a standalone module based on the iReport platform (which is the one we have just created).įinally set the code base of your plugin (i.e. MyPlugin), and a location (which is good to be different than the iReport suite project). In the second step set a name for your plugin (i.e. Remember that if you share the source code of your plugin project, the users must have a platform called iReport inside NetBeans (created in the same way we did here).Ĭreate a new project in NetBeans of type Module (which is a template inside the NetBeans Modules category). Set the platform name to iReport or keep the specific version proposed. Select Add Platform and locate the ireport directory containing the plarform we have just created. Copy it inside the ireport platform (the ireport directory containing all the platform files, see figure 3).įinally define the new platform in NetBeans by using the NetBeans Platform Manager: select Tools → NetBeans Platforms. To use this platform for development we have to copy a directory from the NetBeans platform 6.0.1 called harness. The platform is created inside the /trunk/iReport/dist directory and is called ireport.zip.Įxplode this archive somewhere (you may create a directory dev and keep there the netbeans platform, the iReport sources and the new ireport platform (figure 2). This operation will create a special NetBeans platform (based on the 6.0.1 version) which includes only the modules shipped with iReport (included the ireport cluster). Then run the Ant target called create_platform. Compile iReport as explained in the How to compile iReport from sources tutorial. The best option is to create your plugin on top of a "special" platform based on the iReport cluster. This approach is simple, but it forces you to customize the iReport project, which is not a good idea, and all the time you run your simple plugin, you are actually deployed the whole application loosing a lot of time. The first approach could be to create a module which is part of the iReport suite: in that case you have to change the iReport project to include your module. ![]() By the NetBeans point of view, iReport is a suite (or a collection) of modules that forms a cluster on top of the NetBeans platform: the ireport cluster. ![]() There are several ways to create a plugin for iReport. Preparing the environment for the iReport plugin development When working on a plugin for iReport, it's important to keep in mind that the plugin should work on iReport as standalone application, which does not include all the default modules provided by NetBeans IDE.Īnyway all the main APIs are available in iReport. There are modules included in the platform that provide basic services like access to the file system, drag and drop, nodes management, property sheet, database and JDBC connections management, and so on. To use them, it's necessarty to declare dependencies to the modules which implement the specific features. The NetBeans platform puts at disposal of the developer a big number of features. How to set the dependecies of your module to the iReport APIs.How to create a NBM (NetBeans Module) file that can be installed in iReport using the plugin manager.This will give us the opportunity to see three aspects of the plugin development: The plugin will just add a textfield element to the title band of an opened report. This tutorial explains how to setup the environment to create an plugin for iReport. This allows the use of all the plug-in development facilities provided by the NetBeans IDE to create plugins (and this is why the use of NetBeans IDE is strongly encouraged when working with iReport). This means that to write a plug-in for iReport is the same as create a plugin for NetBeans. The plug-in technology used by iReport is the same used by the NetBeans platform. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |