Plugin Quick Start (5 minutes)

From Gephi:Wiki
Jump to: navigation, search

This HowTo covers how to get started with Gephi plugin development. Make sure you have Git and GitHub set up before starting.

Checkout the gephi-plugins code

We prepared an out of the box development environment on the gephi-plugins repository on GitHub. Once downloaded it doesn't need anything else to run a development version of Gephi.

Fork the project on GitHUb and clone the repository (replace username with your login):

git clone git@github.com:username/gephi-plugins.git

Now you can open the project in Netbeans. Gephi development happens in Netbeans because Gephi is based on the awesome Netbeans Platform. The gephi-plugins folder is automatically recognized when opening a project in Netbeans. Right click on the project and select Run to start Gephi.

You can also run Gephi from the command-line using the 'ant run' command.

Create a plugin

  1. In Netbeans, expand the Gephi Plugins project and right-click on Modules. Select Add New...
  2. Enter the plugin name: MyFirstPlugin and click Next.
  3. In the next panel, enter a unique codebase name, for instance org.myname.myfirstplugin and click Finish.
  4. In the Netbeans Project tree, you should see now your module MyFirstPlugin. Expand it to find its Source Package. Here you will place your code.

You created a plugin, which doesn't do anything for the moment. When you build Gephi, your plugin is now fully integrated. It appears in the Plugin Center (Tools > Plugin).

Brand your plugin

  1. Right-click on your plugin project MyFirstPlugin and select Properties.
  2. Select Display on the left panel and fill Display Category, Short Description and Long Description.
  3. Select Packaging on the left panel and fill License, Homepage (if exists) and Author information.
  4. Click on OK to validate changes.

Distribute your plugin

When you successfully tested your plugin, it's time to create a release.

  1. Right-click on the project and select Package As and then NMBs.
  2. Go to the build folder and find the created plugin-release.zip file. Individual NBM files (one per each module) are packaged in this zip.

Now you can publish you plugin on the Gephi Plugin portal.

See also

This plugin doesn't do any action, you may be interested by HowTo add a module panel or HowTo add a submenu.