Netbeans Plugin
From Agent Factory
Contents |
Introduction
Agent Factory can be installed as a plugin within the Netbeans IDE. Currently, the plugin provides support for:
- Deploying (executing) agents systems based on multiple configurations.
- Writing and compiling of AFAPL2 code.
- Writing and compiling AFAPL code (under redevelopment).
- Templates for Actuators, Perceptors, Modules, and Platform Services.
- Debugging of agent systems (via the Agent Factory Debugger which is a plugin to the Runtime Environment rather than Netbeans)
- Creation of Agent Factory projects
The plugin itself is decomposed into three parts:
- Agent Factory File Support (Templates)
- Agent Factory Projects (Project Wizard)
- Agent Factory Library (Agent Factory Codebase)
The Agent Factory Library component provides a snapshot of the Agent Factory framework, and will be updated only for major releases (i.e. x.x.0 releases). Later in this document, we explain how to integrate intermediary releases into the plugin.
Editorial History
05/04/2008: Version 1 - Introduction & Installation Guide
08/04/2008: Version 2 - Added "Using the Nebeans Plugin" section introduction & How to create a project
Downloading the Module
The Netbeans Modules can be downloaded from either Sourceforge or from the Netbeans Plugin Portal.
Installing the Plugin
Unzip the plugin files and start the Netbeans IDE. When started, goto the Tools menu and select the Plugins option. When the Plugins dialog opens, selected the "Downloaded" tab. You should have a screen that looks something like this:
Next, click on the "Add Plugins..." button, goto the folder into which you extracted the Agent Factory plugins, and select all three plugin files as is shown below:
When added, you should be returned to the main Plugins dialog, and the Agent Factory plugins should now appear in the downloaded list as is shown below:
Finally, click on the "Install" button in the bottom left corner of th Plugins Dialog. Answer all questions normally for the installation of the plugins. At the end of the process, you will be asked to restart the Netbeans IDE, and after that you are ready to go!
Using the Plugin
The plugin can be used to develop all types of Agent Factory component, from run-time tools and new agent architectures to platform services and agents that are programmed using a pre-existing agent interpreter / architecture. However, the core support provided in the current version of the plugin is oriented towards the deployment of agents systems and the programming of agents using the AFAPL2 Development Kit. The following sections, outline how to create an Agent Factory project, write a simple AFAPL2 agent program (taken from the AFAPL2 Programmers Guide), and deploy an agent system containing an agent that is based on that agent program.
Creating a Project
To create a project, go to File->New Project. If the Netbeans Plugin has been installed correctly, then there should be an "Agent Factory" category of project and is selected, you should be able to create a new "Agent Factory Application". The screenshot below shows the project selection dialog with the "Agent Factory" category selected.
To create an Agent Factory application, click on the "Next" button. This leads you to a project specific page in the Project Creation Wizard, a screenshot of which can be seen below.
As can be seen, in addition to the "normal" Netbeans properties, such as project name, project location, and setting the project as the main project, this page also includes two additional properties that can be set. The "Create Main Platform Script" property can be used to create a default Agent Platform Script file while the "Create Main Project Configuration File" property can be used to create a default Platform Configuration File. If you create these two files, then Netbeans is configured so that, when you run the project, the files will be used to deploy an agent system. If you do not create these files, then they can be created and made default at a later date via the project properties file (this will be described later in this guide).
In addition, if you do not declare a default platform configuration file, then Netbeans will use a standard platform configuration file that is deployed as part of the plugin instead.
Once you click on the finish button, an Agent Factory project is created. As can be seen in the screenshot below, this project contains the default empty Agent Platform Script file, and the default empty Platform Configuration File. In addition, a number of Agent Factory specific libraries have also been installed in the project. These libraries reflect the latest major snapsho of the Agent Factory System.
You are now ready to start writing Agent Factory applications and components...
Writing and Compiling an AFAPL2 Program
TBC
Deploying an Application
TBC
Updating the Library
As was indicated earlier, it is possible to update projects so that they use a newer version of Agent Factory. To do this, you must replace the default jar files that are associated with an Agent Factory project with the new release.






