How to set up Eclipse to develop Cytoscape plugins (draft)
Márcio Rosa da Silva (MarcioSilva)
Warning: This page and all Cytoscape 2.x plugins are now out of support. Please see the developer page for Cytoscape 3.x apps.
This document is an introduction on how to set up Eclipse to develop Cytoscape plugins. It is assumed that you have Eclipse installed and running.
Creating the project
Go to File->New->Project... then select Java Project.
On the next dialog, put a name for your project and click Finish.
Right click the new created project in the Package Explorer and select Properties
Then select Java Build Path on the left panel and Libraries in the tabs on the right panel, then choose Add External JARs...
Add cytoscape.jar from the main Cytoscape folder and all the .jar files from the lib/ folder inside the main Cytoscape folder. (you need 2 steps to do this, one for cytoscape.jar and another for the other .jar's)
Apply your changes
Now, create your plugin! You can find some help at the Developer_Homepage.
Running the plugin
To Run your plugin, select Run->Open Run Dialog... in Eclipse and click New (at the bottom-left part of the dialog) to create the settings to run your plugin .
Put a Name for the Run Target and choose cytoscape.CyMain as the Main class.
On the next tab ((x)= Arguments) put the path to your Cytoscape's plugins folder as program arguments (you can add other arguments here, like preload your network, node/edge atributes, expression data, etc. See the Cytoscape's manual for more information on the available command line options.
- Now you can run your plugin!
Note: Before running the plugin for the first time, you may need to put a .jar of the plugin in some place Cytoscape will search for plugins (e.g. the plugins/ folder inside the Cytoscape installarion folder). Otherwise, Cytoscape will not find your plugin. You don't need to generate the .jar for every run, only the first time. Cytoscape only needs to know your plugin is there, but the actual code will be run from the files in your Eclipse project.