2016年6月24日金曜日

Developing your plugin for Icy:

Development environment


First, We should prepare the development environment by following Icy Document.
http://icy.bioimageanalysis.org/index.php?display=startDevWithIcy


I recommend you to do following all 4 steps.
By running hello World Plugin, we can check that the environment works or not.

1. Install Eclipse
2. Install Icy4Eclipse plugin
3. Configure Icy4Eclipse
4. Write your first plugin


Export Plugin


The upper way to run your plugin, max memory configure of icy does not work.
But by normal starting icy, your plugins is not found.
To load your plugins when icy is started by normal way, you have to export your plugin.

First, make your own folder under icy/plugins/. ( You set the folder name login name of your setting upper 3. step better.)
Then return to Eclipse, right click your project and select Export.
Select Java->JAR file and click Next.
Set like following picture and click Finish.
Then start icy by normal way, your plugin will be found!






Import Plugin(Advanced)


If you want to modify someone's plugin, you have to import .jar file into Eclipse.
In Eclipse select File->new Java Project, set Project name, select "Use default JRE",
select "Create separate folders for sources and class files", and click Finish.
Then select src folder and File->import  and import the plugin which you want to modify.
Right click project , select properties, select Icy tab and check "Is an Icy project".
Then reading error message, right click project, select Build path-> Add External Archives,
 import .jar files to fix the error.
NOTE the package name have to be fixed plugins.[your login name].[Project name].