Developers
From PathVisio Wiki
Contents |
Development
Getting Involved
We're always interested in outside help. We're doing our best to have an open development process, to make it as easy as possible for outsiders to contribute.
It can be daunting to learn a the ins and outs of a large codebase all at once. To help you, we keep a list of low hanging fruit, small tasks that should be easy to dive right in and get started with the code base.
Meetings
For developers we organize a montly webconference through Skype. For more info, see: Meetings
Bugs
For a list of known bugs, see: Bugs
Reporting bugs: If you find a bug, please send us an email at martijn.vaniersel@bigcat.unimaas.nl
Please report
- What you expected to happen and what happened instead
- Your operating system
- The revision number of PathVisio you worked with, which can be found in the Help->About dialog.
Roadmap
See Roadmap.
See RFCIndex
Daily builds
If you like to live on the edge, you can run the webstarts of the daily build here: PathVisio v1 or PathVisio v2
Obtaining the source
With the 1.0 final release of Pathvisio, the source code will be available free of hassle through anonymous subversion access. You can now browse or download the source code from our subversion repository: http://svn.bigcat.unimaas.nl/pathvisio.
Coding Style
- Each java or perl file should begin with the same license header. Simply c/p from another file when starting a new one. The license header should be the very first thing, so before any "package" or "import" lines.
- Braces should line up, e.g.
public class Comment implements Cloneable
{
Comment (String _comment, String _source)
{
source = _source;
comment = _comment;
}
public Object clone() throws CloneNotSupportedException
{
return super.clone();
}
public String source;
public String comment;
}
- case
- classes and interfaces are CamelCasingStartsWithUpper
- methods and fields are camelCasingStartsWithLower
- static finals are ALL_CAPS_WITH_UNDERSCORES
- enum constants are also ALL_CAPS_WITH_UNDERSCORES
- naming. We use prefixes to indicate semantic types, e.g. where a java type alone does not fully specify the meaning of the variable. For example, model coordinates and view coordinates both have the java type "double". to distinguish between the two we use prefixes.
coordinates should get a prefix "m" for model, "v" for view (e.g. Mclass, mMethod or M_CONSTANT). This goes for font sizes as well. Conversion between the two is always done through the mFromV or vFromM methods, this way one can see if a line is correct at a glance. For example: mWidth = mFromV (vWidth) is correct. mWidth = mFromV (vWidth + mOffset) is wrong.
- use the following parts in names:
- ...Dlg for dialogs (so not: AboutBox)
- ...Wizard for wizards
- ...Panel for sidepanels
- Gdb for stuff related to synonym databases
- Gex for stuff related to gene expression data (so not: ImportExprDataWizard)
- Try to keep Class names short and to the point. Don't put implementation details in the class name if it is not necessary. E.g. not "GmmlBpBrowser" but "BackpagePanel". Not "SuggestGdbCellEditor" but "GdbCellEditor".
Compiling with Eclipse 3.x
Step 1. Download and install the eclipse IDE if you haven't done so yet.
Step 2. Install the subclipse plugin. To do this:
- go to Help->Software->Find and Install
- Search for new features to install
- add http://subclipse.tigris.org/update_1.0.x as a new remote site (click finish)
- you should see the subclipse plugin in your window, check it and click next.
Step 3. Start a new project of type "Checkout Projects from SVN". (File->New->Project)
(screenshot)
[image: (screenshot)]
In the following wizard steps, you have to create a new repository at location "http://svn.bigcat.unimaas.nl/pathvisio". Select the trunk directory (unless you are interested in a particular branch, in that case, select the branch you want). Check out the project configured using the New Project Wizard (See next step)
Step 4. In the New Project wizard, select a project of type "Java Project". (screenshot)
Choose any project name. Make sure you set the JDK Compliance to 5.0 (or higher) (screenshot)
Finish the wizard right away, we'll set the remaining project options after the initital checkout.
Step 5. Go to the menu Window->Show View->Ant and drag the file "build.xml" to this view. select resources-jar and run it (the green play button) (screenshot). Refresh the file list in the Package explorer by selecting the project name and pressing F5.
Step 6. Go to the menu Project->Properties. Select "java build path" on the right.
6a. On the Source tab, remove the default for source folders. Instead, add the src/core, src/swing, src/swt and src/v1 folders (for version 1.0) or the src/core, src/swt, src/swing, src/v2 and src/plugin folders (for version 2.0).
6b. In the libraries tab, click "Add JARs..", and select all jar files in the lib directory and all subdirectories of the lib directory (i.e. lib/apache/*.jar, lib/batik/*.jar, lib/paxtools/*.jar). Make sure you select only the swt libraries for your platform, e.g. lib/swt-win32-lib/swt.jar for windows.
You should now be able to build the project without getting errors.
Step 7. Create a run configuration in the menu Run->Run... Set the project to the one you just created and set the main class to org.pathvisio.gui.swt.GuiMain
Troubleshooting Compilation
- You can safely ignore this error "[exec] Execute failed: java.io.IOException: Cannot run program "svnversion". PathVisio uses the program svnversion to obtain the current revision of the project and include it in the about dialog, so this is non-critical.
- If you are missing the file Revision.java, make sure you run the the ant "resources-jar" target or "prepare" target. The file Revision.java is automatically generated. Don't forget to refresh the project in eclipse (press F5) after you ran ant.
- If you see errors like "Error: Couldn't load resource 'icons/undo.gif'", this means you're missing resources.jar from your classpath. Resources.jar is also automatically generated. Make sure you've run the ant "resources-jar" target, and resources.jar is included in the project.
Compiling from the command line
to do ...
More
- Cytoscape plugin, the GPML reader/writer for Cytoscape
- BioPAX in GPML, progress on including BioPAX code in GPML
- R Interface, description of the R interface
- GeneDatabaseLayout, including documentation of older schema's
- GexLayout
- EverythingGPML Getting started with GPML
