DOCUMENTATION TUTORIALS DOWNLOAD NEWS CONTRIBUTE

Developing Plugins

This page details how to create a new plug-in in order to extend the GAML language with new skills, species, displays or operators. It also details how to create a plug-in that can be uploaded on an update site and can be installed into the GAMA release. We consider here that the developer version of GAMA has been installed (as detailled in this page).

Creation of a plug-in

Here are detailled steps to create and configure a new GAMA plug-in.

Your plug-in has been created.

The plug-in is ready to accept any addition to the GAML language, e.g. skills, actions, operators.

Do not forget to export the created packages that could be used by “clients”, especially the packages containing the code of the additions (in the plugin.xml of the new project, tab “Runtime”).

To test the plug-in and use it into GAMA, developers have to define a new feature project containing your plugin and its dependencies, and adds this feature to the existing product (or a new .product file of your own). The use of feature is also mandatory to define a plug-in that can be uploaded on the update site and can be installed in the release of GAMA.

Creation of a feature

A feature is an Eclipse project dedicated to gather one or several plug-ins to integrate them into a product or to deploy them on the update site and install them from the GAMA release (a feature is mandatory in this case).

Here are detailled steps to create and configure a new feature.

Addition of a feature to the product

In the product, e.g. gama.product in the ummisco.gama.product project:

Remark: To check whether the new plug-in has been taken into account by GAMA, after GAMA launch, it should appear in the Eclipse console in a line beginning by “» GAMA bundle loaded in “.

How to make a plug-in available at GAMA update site for the GAMA release

Considering a working GAMA plugin named institution.gama.pluginsName

Configure plugin to be available for Maven

a/ Add pom.xml for plugin institution.gama.pluginsName :

b/ Configure pom.xml to recognize the parent pom.xml for Maven builds

c/ Update maven cache in eclipse (optional) It will fix this compilation error “Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project… from the project context menu or use Quick Fix.”

Create a feature for the plugin

a/ Create new feature

b/ Add pom.xml for feature institution.gama.feature.pluginsName :

c/ Configure pom.xml to recognize the parent pom.xml for Maven builds

d/ Update maven cache in eclipse (optional) It will fix this compilation error “Project configuration is not up-to-date with pom.xml. Select: Maven->Update Project… from the project context menu or use Quick Fix.”

Update p2updatesite category.xml (this step will be done automatically by travis, soon)

Open msi.gama.experimental.p2updatesite

How to make a plug-in available as an extension for the GAMA release (obsolete)

Once the plug-in has been tested in the GAMA SVN version, it can be made available for GAMA release users.

First, the update_site should be checked out from the SVN repository:

Now the update_site project is available in the project list (in Package Explorer). The sequel describes how to add a new feature to the update site.

The plug-in is now available as an extension from the GAMA release. More details about the update of the GAMA realease are available on the dedicated page.