Geneious plugins can be developed in whatever Java development environment you are comfortable using.
Note that Geneious still supports Java 6, so for maximum compatibility you should avoid using APIs or
language features from Java 7 or later.
The included Eclipse, IntelliJ and Ant examples should already be set up to use Java 6.
Once you have downloaded and installed the Java Development Kit (JDK) for your platform follow the instructions below for
setting up Geneious plugin development in Eclipse or IntelliJ IDEA.
There is also an explanation of what is required to run Geneious if you want to set everything up yourself,
and a brief discussion of building and distributing your plugins once you have something you want to share with the world!
Also be aware that this version of Geneious does not bundle licence activation code for size reasons,
so if you want to activate a Geneious licence you will need to download
the standard Geneious release for your platform.
These instructions are for version 3.6 of Eclipse (Helios); the exact steps may differ in other versions.
Open Eclipse. From the File menu, select Import...
Expand the General folder and select Existing Projects into Workspace.
Click the Next button, then click the Browse... button next to the "Select root directory:" field.
Navigate to the "examples" directory (which should be in the same place as this document) and select it.
Click OK and a dozen or so projects should appear in the Projects textfield.
Click Finish and they should appear in the Package Explorer navigation pane in Eclipse.
You may need to close the Eclipse welcome screen to get to the workbench and see the newly imported projects.
Select the Run menu and click Debug Configurations.
Under "Java Applications" select one of the preconfigured applications, we suggest "ExampleDocumentViewer" to get started.
Select one with "32 bit" or "64 bit" in the name to match the bit size of your Java VM.
Click Debug to launch Geneious with this sample plugin enabled.
When you select a sequence you should see the "Ludicrously Giant Sequence Viewer" as an option in the lower panel in Geneious.
If you set a breakpoint within the code (by right clicking in the margin and selecting Toggle Breakpoint) execution should stop at that line so you can debug.
(To view the source code for the examples expand them in the Package Explorer in Eclipse)
A good place to test this is in the "paintComponent" method of the "ExampleDocumentViewer.java" file.
Switching back to Geneious and selecting the "Ludicrously Giant Sequence Viewer" should trigger the breakpoint.
These instructions are for version 13 of IntelliJ IDEA; the exact steps may differ in other versions.
Open IntelliJ IDEA. From the File menu, select Open...
Navigate to the "examples" directory (which should be in the same place as this document), select it and click OK.
The "ExampleDocumentViewerPlugin.java" file should now be open in the editor. If there are errors (eg some text is red) you may need to set up your JDK.
To set up your JDK click File, then Project Structure, then either select a preconfigured SDK or create a new one (must be Java 6).
To create a new SDK click New, then JSDK and select the location where the Java Development Kit is installed (you may need to use a search engine if you don't know where this is on your operating system).
Click OK and the JDK should appear in the combobox to the left. Click OK again and you should be returned to the editor.
You may see a warning similar to "Class ISeekMain not found in module". This can be ignored as the class is provided at runtime.
You should now be able to click Run in the menu then Debug to start Geneious with the "ExampleDocumentViewer" Debug Configuration.
Select a debug configuration with "32 bit" or "64 bit" in the name to match the bit size of your Java VM.
Note you may need to wait for IntelliJ to index the project before this option becomes available.
When you select a sequence you should see the "Ludicrously Giant Sequence Viewer" as an option in the lower panel in Geneious.
If you set a breakpoint within the code (by clicking in the margin) execution should stop at that line so you can debug.
A good place to test this is in the "paintComponent" method of the "ExampleDocumentViewer.java" file.
Switching back to Geneious and selecting the "Ludicrously Giant Sequence Viewer" should trigger the breakpoint.
This description is fairly generic and should allow you to set up a debugging environment yourself.
All the files required to run Geneious are in the "GeneiousFiles" directory. This should be set as the Java VM working directory.
The main class (in the java sense of the word) is com.biomatters.iseek.application.ISeekMain which is in the ISeek.jar file.
We use the following VM arguments with the examples: "-ea -Xss512K -Xms256M -Xmx768M -XX:MaxPermSize=96M", we also use "-XX:+UseConcMarkSweepGC" to increase performance on 64 bit VMs.
You may need to tweak the memory settings (Xmx and MaxPermSize) depending on your machine specs and what you're trying to do with Geneious.
The jars in the lib directory will need to be on the java classpath, as will the resources directory.
You may code against GeniousPublicAPI.jar, jebl.jar and jdom.jar.
Geneious will automatically pick up its plugins from the bundledPlugins directory.
There are several ways to get Geneious to load an external plugin:
The easiest way to make your own plugin is to edit one of the examples and go from there.
The provided examples all come with Ant build scripts which include a task which will rename everything to a name you choose.
In both Eclipse and IntelliJ the Ant file may be opened by double clicking on the "build.xml" file.
Both also have a dedicated tool for running Ant scripts, to make this visible: