-
Notifications
You must be signed in to change notification settings - Fork 1
2 Project Setup
This HowTo explains the implementation of Vigral compatibel Algorithms with Eclipse as IDE. In this tutorial I use Eclipse Luna (Release 4.4.0) under Windows 7.
-
The first step after installing Eclipse, is to create a new and empty project with a name of your choice. I call it 'plugin_tutorial'. As execution environment JRE I choose Java 6 (JavaSE-1.6).
-
The next step is to get all libraries you need. You then should put these into your project folder, e.g. in a subfolder called 'libs'. What follows is what library files you need and where you can get them:
- the newest Plugin framework for creating graph algorithms for Vigral (vigral_plugins_framework_vX.X.jar). You can download the newest version here: https://github.com/chiller87/vigral/releases. For this tutorial I use the version 0.3 (vigral_plugins_framework_v0.3.jar)
- two JUNG (Java Universal Network/Graph Framework) jar files (jung-graph-impl-2.0.1.jar and jung-api-2.0.1.jar) that you can download from the JUNG sourceforge page (http://jung.sourceforge.net/). You will need to download the zip file with all JUNG .jar files, but you just need the two mentioned above.
-
The next step ist to add these '.jar' files to the Build Path. In Eclipse you can achieve this by rightclicking each '.jar' file and choosing 'Build Path -> Add to Build Path'.
-
Now you can implement all Algorithms in this one project. To implement one, you first have to create a new Java-Class. This File MUST be in the default package. So we rightclick our project 'plugin_tutorial' and choosing 'New -> Class'. In the appearing 'New Java Class' wizard, we have to choose a name for our File. For this Tutorial I choose the class name 'MyAlgorithm'. Now we have to clear the field 'Package' to make sure, that this file is created in the default package. Now we can finish the wizard.
Now the setup part is done. What follows ist to implement the interface.