Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File>New>Plugin (Eclipse) #63

ctrueden opened this Issue May 1, 2014 · 1 comment


None yet
1 participant
Copy link

ctrueden commented May 1, 2014

From @dscho:

Eclipse seems to become more and more popular these days. So, to make things easier for developers, add a plugin that sets up an Eclipse project to develop an IJ2 plugin. This entails:

  • a wizard-like user interface
  • discovering/asking for the location of Eclipse (and remembering it via Preferences)
  • setting up the directory structure
  • activating the annotation processing (see ticket #1023)
  • adding an appropriate Run configuration

We might be able to come up with way to "listen" for an event sent by the Run configuration that triggers

  • setting up a new class loader
  • loading the classes compiled by Eclipse
  • running the plugin
  • giving feedback via the established connection about exceptions/failures/success

Eclipse provides quite powerful debugging facilities. This most likely requires ImageJ's to be started in a special mode listening for debuggers (which we could even store in ImageJ.cfg so that any subsequent restart of ImageJ activates that mode), but we might not be able to benefit from Eclipse's in-place code-replacing.

So: even if we manage to come up with a Run configuration that will run the plugin in the current ImageJ instance, we will most probably need to come up with a standalone Run and Debug configuration (that starts up ImageJ whereever it might be installed, adding the appropriate classpath so the plugin is discovered, possibly loading certain images -- that might be chosen from the list of open images at the time File>New>Plugin (Eclipse) is run -- and then runs the plugin).

As a consequence, we need to teach imagej.Main to sprout a way to open images and call plugins from the command-line. The appropriate place is AbstractUserInterface's processArgs() method (whose javadoc should then contain the note that subclasses overriding that method need to hand off to AbstractUserInterface to handle the default command-line parameters).



This comment has been minimized.

Copy link
Member Author

ctrueden commented May 1, 2014

See the original ticket for thoughts, directions and code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.