imagej / imagej/imagej2

File>New>Plugin (Eclipse)

Open
#63 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.4k
Forks
350
PR merge metrics
No merged PRs in 30d

Description

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).

Migrated-From: http://trac.imagej.net/ticket/1024

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with imagej.Main and AbstractUserInterface's processArgs() method, including its javadoc, and review annotation processing under ticket #1023. Define the Eclipse wizard, preferences, directory setup, Run and Debug configurations, and command-line support as separate scopes. Done means an Eclipse project can be created and run or debugged with the requested ImageJ integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, developer-experience, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.