Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur
Register

Developing your plugin for Icy:

Quick start in 4 steps :

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

  • Import Plugins Tutorials projects from GitHub
  • Work from the Icy-App GitHub project

  • You should also check the Icy4Eclipse plugin website. It contains more informations about Icy4Eclipse and how create plugin using others plugins.

    Feel free to ask for support !

    1. Install Eclipse

    Icy plugins are developed in Java. Java can be written with any editor. In our examples we use the Eclipse IDE.
  • Download the Eclipse IDE for Java Developers directly from the eclipse website
    (Check you're downloading the version corresponding to your system.)

  • Eclipse download
  • Just unpack the archive and Eclipse is ready to be used !
  • 2. Install Icy4Eclipse plugin

    The Icy4Eclipse plugin (written by Nicolas Hervé) makes easy the development of plugin for Icy.

  • Go to the Help > Install New Software... menu.

  • Eclipse Icy4Eclipse plugin installation - step 1

  • Enter http://www.herve.name/icy4eclipse/updates/ in the first field and select found plugin to install it.

  • Eclipse Icy4Eclipse plugin installation - step 2

  • You will be asked for confirmations, agreements and restart. Validate them all, then verify the plugin is correctly installed. You shoud now see 3 new button in the main bar of Eclipse:
  • R: Run mode: To run Icy with your local plugin loaded and updates features of Icy turned off.
  • D: Debug mode.
  • U: Update mode: Icy is launched and can connect to internet to search for update and install plugins. Use this option to update your dev version of Icy.

  • Eclipse Icy4Eclipse plugin installation - step 3

  • Icy4Eclipse plugin installation is done !
  • 3. Configure Icy4Eclipse plugin

    This section explains how to configure the Icy4Eclipse plugin to work with an installed Icy application.
    The developer login is the identifiant you use to connect
    on the official Icy website. This login is also used to uniquely identify your plugin and will be the prefix of your plugin package name.

  • Go to the Eclipse preferences : Eclipse > Preferences menu on Mac or Window > Preferences menu on Windows.

  • Icy4Eclipse plugin configuration - step 1


  • Select Icy preferences, fill the Icy home directory field with the Icy installation path then enter your developer login and click on OK to validate.

  • Icy4Eclipse plugin configuration - step 2

    Icy4Eclipse configuration is done !

    4. Write your first plugin

    Hello World ! ... from Icy :)

  • Go File > New > Other... menu.

  • Write your first plugin - step 1

  • Enter icy in the search box, select Icy Plugin and click on Next.

  • Write your first plugin - step 2

  • Enter your Plugin Name (Subpackage field is automatically filled) then click on Finish.

  • Write your first plugin - step 3

  • Congrats ! you wrote your first plugin :) Just click on the 'R' (Run) icon to launch Icy and test the plugin.

  • Write your first plugin - step 4

    If all work correctly, you should see your plugin in the Plugins > Other Plugins section :

    Write your first plugin - step 5

    Getting further...

    Import Plugins Tutorials projects from GitHub.

    This section explains how to import the Plugin Tutorials repository from GitHub and how to create the project under Eclipse.
    Plugin Tutorials contains various examples (image creation, modification, gui...) that will help you to develop your plugin.

  • Install Git for eclipse: Open Eclipse and go to the Help > Install New Software... menu.

  • Eclipse GIT plugin installation - step 1

  • Search for git in All Available Sites then select all available softwares to install them.

  • Eclipse GIT plugin installation - step 2

  • Go to the File > Import... menu, select Projects from Git and enter git://github.com/Icy-imaging/Plugins-Tutorials.git as source.

  • Import Plugins-Tutorials from GitHub - step 1

  • Select the master branch.

  • Import Plugins-Tutorials from GitHub - step 2

  • You now have the Plugins Tutorials project in your Eclipse workspace.

  • Import Plugins-Tutorials from GitHub - step 3

  • We need to define this project as Icy Plugin (to make plugins visible in Icy), just go to the project properties.

  • Import Plugins-Tutorials from GitHub - step 4

  • Select Icy properties, check the Is an Icy project box and click on OK.

  • Import Plugins-Tutorials from GitHub - step 5

  • Now click on the 'R' (Run) icon to launch Icy, you should see all the tutorials plugins.

  • Import Plugins-Tutorials from GitHub - step 6

    Work from the Icy-App GitHub project

    Using the Icy-App GitHub project as library source provides some advantages:
  • Staying up to date
  • Access to the next version
  • Prepare your plugins for new features

  • Import Icy-App project from GitHub

    This section explains how to import the Icy-App repository from GitHub and how to create the project under Eclipse.

  • Go to the File->Import... menu.

  • Import Icy-App from GitHub - step 1

  • Select Projects from Git and click on Next. Git can complain about its home directory, use the default one and continue.

  • Import Icy-App from GitHub - step 2

  • Enter git://github.com/Icy-imaging/Icy-App.git in the address field and click on Clone.

  • Import Icy-App from GitHub - step 3

  • Keep default parameters and click on Next.

  • Import Icy-App from GitHub - step 4

  • You'll see available branchs, keep all them and click on Next.

  • Import Icy-App from GitHub - step 5

  • Select release for initial branch as it corresponds to the current Icy version then click on Finish.
  •    (The master branch corresponds to the current development version and may be incompatible with release version)

    Import Icy-App from GitHub - step 6

  • The repository has been imported locally, choose it to create the Eclipse project and click on Next.

  • Import Icy-App from GitHub - step 7

  • Select the previously imported repository and click on Finish.

  • Import Icy-App from GitHub - step 8

  • Create the local master branch by right clicking on the Icy-App project then and go to Team->Switch To->New branch...

  • Import Icy-App from GitHub - step 9

  • Select refs/remotes/origin/master as Source reference and enter master in branch field then click on Finish.

  • Import Icy-App from GitHub - step 10

  • Switch back to release branch : right click on the Icy-App project then and go to Team->Switch To->release.

  • Import Icy-App from GitHub - step 11

  • Verify you now have Icy-App project in your workspace.

  • Import Icy-App from GitHub - step 12

    Icy-App project import is done !

    Configure Icy4Eclipse plugin for Icy-App

    This section explains how to configure the Icy4Eclipse plugin to work with Icy-App project.
    Before starting you have to know the developer login is the identifiant you use to connect on the official Icy website and which permit you to manage your online plugins.
    This login is also used to uniquely identify your plugin and will be a part of your plugin package name so choose it carefully !

  • Go to the Eclipse preferences : Eclipse->Preferences menu on Mac or Windows->Preferences menu on Windows.

  • Icy4Eclipse plugin configuration - step 1


  • Select Icy preferences and fill the Icy home directory field with the path of the Icy-App project (should be located in the default Git repository folder).
    Then enter your developer login and Click on OK to validate.

  • Icy4Eclipse plugin configuration - step 2

    Icy4Eclipse configuration is done !

    You're now ready to work from Icy-App repository.
    You can choose release (release version) or master (WIP development) branch depending what you want to do.