-
Notifications
You must be signed in to change notification settings - Fork 21
PathVisio setup in Eclipse
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.
-
Download Eclipse, one of the Java developers versions (download Neon 3)). (other versions)
-
Either work with the command line, or download Github Desktop (download).
-
Fork the Pathvisio github repository to your own account, click on "Clone or Download" (green button), and then on “Open in Desktop”.
-
In the toolbar, click on FILE/Import/General/"Existing Project into workspace” and click next.
-
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).
-
Click on finish.
-
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.
- 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"
- 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).
- 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:
- 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:
-
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).
-
The Package Explorer should now show only one red cross for a folder (aka module):
- Select the build.xml file (under org.pathvisio.core), and with right click select Run as/ 1. Ant build.
-
You should see the output in the Console window (Text: BUILD SUCCESSFUL Total time: 6 seconds)***
-
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.
-
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...
- Select OSGi framework, double click.
-
Create a name for your run configuration (in the example PathVisioRun), click Apply and then Run.
-
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.
*** 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:
- Go to Window → Preferences, and search for Java. One option is called "Installed JREs":
-
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).
-
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 )