← Revision 1 as of 2007-08-21 17:10:06 →
Size: 2074
Comment: This is mostly a clone of Setting up eclipse...
|
← Revision 5 as of 2012-05-24 19:57:46
Size: 2334
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
~+'''How to set up Netbeans to develop Cytoscape plugins (draft)'''+~ | ~+'''How to set up Netbeans to develop Cytoscape plugins'''+~ |
Line 7: | Line 7: |
[[TableOfContents]] |
<<TableOfContents>> |
Line 12: | Line 10: |
This document is an introduction on how to set up [[http://www.netbeans.org|Netbeans]] to develop Cytoscape plugins. It is assumed that you have Netbeans installed and running. | |
Line 13: | Line 12: |
This document is an introduction on how to set up [http://www.netbeans.org Netbeans] to develop Cytoscape plugins. It is assumed that you have Netbeans installed and running. |
== Setting up a project == * Create a java class library project * {{{File->New->Project...}}} then select {{{Java Class Library}}} * {{{Name the project, selecting working directories etc.}}} * Edit the projects properties * right click the new created project in the {{{Package Explorer}}} and select {{{Properties}}} * Add the cytoscape libraries, {{{cytoscape.jar}}} from the main Cytoscape folder and all the {{{.jar}}} files from the {{{lib/}}} folder inside the main Cytoscape folder. * select{{{ }}}{{{Libraries}}} from the tree in the left panel * add the cytoscape specific {{{Add JAR/Folder}}} * Prepare to run cytoscape * select {{{Run}}} from the left panel * set the "Main class" to 'cytoscape.CyMain' * (optional) set the "Arguments" * to pick up standard plugins use '-p "C:\Program Files\Cytoscape_v2.5.0\plugins"' (or whatever the plugin directory is), this option can be repeated * preload your network, node/edge atributes, expression data, etc. See the Cytoscape's [[http://cytoscape.org/manual/Cytoscape2_1Manual.pdf|manual]] for more information on the available command line options. * {{{Apply}}} your changes |
Line 16: | Line 30: |
== Creating a project == |
== Cytoscape needs to know that your plugin exists == Netbeans takes care of including the plugin library in the class path but it does not notify Cytoscape of its existance. This can be done in one of two ways. The preferred way is to "install" the plugin. This has the added benefit of making it possible to uninstall and reinstall without restarting Cytoscape. |
Line 18: | Line 38: |
* 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"]. |
The easiest way to cause Cytoscape to recognize the plugin is to place a "dummy" jar file in one of the plugin directories. All that is needed is a jar file containing a class with a default constructor. This is not executed at runtime as the actual libraries will be found first. |
Line 26: | Line 43: |
== Running the plugin == * To Run your plugin, select {{{Run->Run...}}} in Netbeans 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 [http://cytoscape.org/manual/Cytoscape2_1Manual.pdf manual] for more information on the available command line options. * Now you can run your plugin! == Debugging == The plugin can be debugged in two modes. One mode is typical and involves restarting Cytoscape each time. The other mode provides for attaching the plugin to a running version of Cytoscape. |
You can find help at the [[Developer_Homepage]] and [[Cytoscape_Plugin_Tutorial]]. |
Line 41: | Line 46: |
How to set up Netbeans to develop Cytoscape plugins
Fred Eisele (FredEisele)
August 2007
Introduction
This document is an introduction on how to set up Netbeans to develop Cytoscape plugins. It is assumed that you have Netbeans installed and running.
Setting up a project
- Create a java class library project
File->New->Project... then select Java Class Library
Name the project, selecting working directories etc.
- Edit the projects properties
right click the new created project in the Package Explorer and select Properties
Add the cytoscape libraries, cytoscape.jar from the main Cytoscape folder and all the .jar files from the lib/ folder inside the main Cytoscape folder.
select Libraries from the tree in the left panel
add the cytoscape specific Add JAR/Folder
- Prepare to run cytoscape
select Run from the left panel
set the "Main class" to 'cytoscape.CyMain'
- (optional) set the "Arguments"
- to pick up standard plugins use '-p "C:\Program Files\Cytoscape_v2.5.0\plugins"' (or whatever the plugin directory is), this option can be repeated
preload your network, node/edge atributes, expression data, etc. See the Cytoscape's manual for more information on the available command line options.
Apply your changes
Cytoscape needs to know that your plugin exists
Netbeans takes care of including the plugin library in the class path but it does not notify Cytoscape of its existance. This can be done in one of two ways. The preferred way is to "install" the plugin. This has the added benefit of making it possible to uninstall and reinstall without restarting Cytoscape.
The easiest way to cause Cytoscape to recognize the plugin is to place a "dummy" jar file in one of the plugin directories. All that is needed is a jar file containing a class with a default constructor. This is not executed at runtime as the actual libraries will be found first.
You can find help at the Developer_Homepage and Cytoscape_Plugin_Tutorial.
Category: NetbeansAndCytoscapeDevelopment