Greetings!
I am wondering if someone have any experience using Eclipse IDE for developing plugins for ImageJ. In that case, what is the most convenient workspace configuration? Sincerely Paul Baggethun Elkem Research |
On 19 Aug 2008, at 08:51, Pål Baggethun wrote:
> Greetings! > > I am wondering if someone have any experience using Eclipse IDE for > developing plugins for ImageJ. In that case, what is the most > convenient > workspace configuration? Yes, I've done this. In the simplest form you just include ij.jar from ImageJ in your project build path and eclipse will then recognise all of the classes you'll need. You don't need to import the actual jar into the project, just point eclipse at the copy in your ImageJ installation and it will work fine. I have also tried importing classes from other plugins, but eclipse can get confused where included jars put classes into the default package (as most plugins do). For actually running/testing your plugin I tended to add a main method to it to simulate being called from ImageJ. It just loads an image to create an ImagePlus object and then passed that to the setup method. How you do this will depend on what sort of a plugin you're writing. You'll also need to remember to modify the VM arguments in the run settings to increase the amount of memory allocated as the default is usually too small. It's also fairly easy to have a shell open with a command to copy the latest version of your plugin into a real ImageJ install so you can test it in-situ very quickly. Simon. |
In reply to this post by Pål Baggethun
Hi Paul,
I find it beneficial to use Eclipse together with the build system Maven, for my medium sized project, ShapeLogic that is using more than one unit test per plugin and is using several third party jar. The advantages are: * All the unit tests live in a different directory and are not included when you build you plugin jar file * It is simple to include external jar files and update them to use newer version just by changing the version number * You can run all your unit tests from command line using Maven or run an individual unit test from Eclipse for debugging * It is simple to build a plugin jar file from command line The disadvantages are that it is more work to set up and more tools to learn, so it is overkill to use Maven for small project. I wrote a little description about how I set it up here http://www.shapelogic.org/setup.html Link to Maven: http://maven.apache.org/ -Sami Badawi http://www.shapelogic.org On Tue, Aug 19, 2008 at 3:51 AM, Pål Baggethun <[hidden email]> wrote: > Greetings! > > I am wondering if someone have any experience using Eclipse IDE for > developing plugins for ImageJ. In that case, what is the most convenient > workspace configuration? > > > Sincerely > Paul Baggethun > Elkem Research > |
In reply to this post by Pål Baggethun
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Hello, I've been in holidays, so I only saw your question now. We will discuss this question in my workshop at the ImageJ conference. http://imagejconf.tudor.lu/programme/workshops/applying-best-practices-to-the%20development Tbe setup that I propose is: - - create a workspace - - in the workspace create a project for imagej and import the imagej source code - - in the workspace create another project for your development - - create a development-runtime folder on the same level as the above workspace. This folder named "run" contains the imagej configuration files, the plugin and macros folder, etc. - - create a launch configuration that uses the "run" folder as working directory. Add your project to the classpath. - - develop your code in packages in your project. Write the plugin interfaces in the default package. - - Use an ant script that copies your plugins from the default package to your subfolder of the folder plugins in the folder "run" - - You can add the ant script to the builders of your project. This way it will be executed automatically when your code is compiled. Here is the ant script I use: <?xml version="1.0" encoding="UTF-8"?> <project name="copy plugins" default="Copy Plugins" basedir="."> <property name = "runtimePluginFolder" value="$basedir/../../run/plugins/Montpellier RIO Imaging"/> <property name = "source" value="./bin/"/> <target name="Copy Plugins"> <copy todir="${runtimePluginFolder}"> <fileset dir="${source}"> <include name="*.class"/> </fileset> </copy> </target> </project> For deployment another script is used, that creates jar files for the plugins and puts them into a zip-file. Best regards, Volker Baecker Pål Baggethun a écrit : > Greetings! > > I am wondering if someone have any experience using Eclipse IDE for > developing plugins for ImageJ. In that case, what is the most convenient > workspace configuration? > > > Sincerely > Paul Baggethun > Elkem Research > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIu+UTxZKX7A/4oMERAn/JAJ0XZ5AY7ehI+4GfQ7UqA9G9ZgOrAACg1jbk yoY/yonjArzheqm5TtQikZc= =5fwX -----END PGP SIGNATURE----- -- passerelle antivirus du campus CNRS de Montpellier -- |
Free forum by Nabble | Edit this page |