Skip to content

PathVisio setup in Eclipse

De edited this page Aug 10, 2020 · 27 revisions

Note: the documentation below was Tested with:

  • Neon 3, Eclipse IDE for Committers, 32 bit, on Windows 7.
  • Eclipse IDE (2019-03), 64 bit, Linux (Ubuntu).

Note: items with a *** have a "Q&A" section at the bottom of this page.

Building with Ant:

  1. Download Eclipse, one of the Java developers versions (download Neon 3)). (other versions)

  2. Either work with the command line, or download Github Desktop (download).

  3. Fork the Pathvisio github repository to your own account, click on "Clone or Download" (green button), and then on “Open in Desktop”.

  4. In the toolbar, click on FILE/Import/General/"Existing Project into workspace” and click next.

image

  1. Browse to the folder where your local installation of the repository is saved and select it. All folders and files will be shown in the main field of this page. Deselect the Launcher (in Modules folder).

  2. Click on finish.

  3. The different folders from the github repository should now appear on the left in your workspace (under package explorer). Normally, errors will show up at this point.

    1. In Eclipse, change one of the settings for the build.xml file (in the org.pathvisio.core), to allow for special characters. This is located in the toolbar under File/Properties. Then, under Resource/Attribute/Text file encoding, select other, and then UTF-8. Click "apply and close"

image

  1. In order to set the correct dependencies, you should select a target platform, with the correct library. From the toolbar, select Window/Preferences. In the pop-up menu, click on Plugin Development/Target Platform***. Click on Add. If this window does not contain an option for Plugin Development, please add the required software via Help/"Install New Software" (more details here).

image

  1. Select the first option (Nothing, start with an empty target definition), and click next; Choose a name for your target platform, click add, select directory, click next:

image

  1. Select the folder called "lib" from the pathvisio repository (which you installed locally on your computer). Click Finish (2x), after which you should see the following change in the Preferences panel:

image

  1. Select the new target platform you created (in the example called Pathvisio), click Apply and then OK. Now Eclipse will build the workspace (you can track progress in the bottom right corner of Eclipse).

  2. The Package Explorer should now show only one red cross for a folder (aka module):

image

  1. Select the build.xml file (under org.pathvisio.core), and with right click select Run as/ 1. Ant build.

image

  1. You should see the output in the Console window (Text: BUILD SUCCESSFUL Total time: 6 seconds)***

  2. Click on the main folder (org.pathvisio.core) and press F5 to refresh the folder. Now, all the red crosses on the folder should have disappeared.

  3. In order to see the changes that you made to the code in Pathvisio, you have to create an option to run Pathvisio from your Eclipse code in Eclipse. Click on arrow next to the green run button (See image below), and select Run Configuration...

image

  1. Select OSGi framework, double click.

image

  1. Create a name for your run configuration (in the example PathVisioRun), click Apply and then Run.

  2. You should now be good to go. Start coding and have fun ;)

*** If you are missing the Plugin-Development environment, please go to: Help/Install software. Click on "all available sites" and search for General Purpose Tools>Eclipse Plug-in Development.

image

*** If the build fails due to the Java version used (NOTE: PV needs the Java Developer Kit (JDK), not the Java Runtime Environment (JRE)), please take the following steps:

image

  1. Go to Window → Preferences, and search for Java. One option is called "Installed JREs":

image

  1. Click on "Add…" , then “standard VM” and select the local folder where you have a locally installed JDK version of java. Rebuild the workspace (by clicking Apply in the preference menu again.) and try to rebuild Pathvisio with Ant (step 13 above).

  2. If the above doesn’t work, add the JDK-HOME to your classpath. For more information on why to use JDK iso JRE, see: https://stackoverflow.com/questions/1906445/what-is-the-difference-between-jdk-and-jre )

Clone this wiki locally