Ticket #993 (new enhancement) — at Initial Version

Opened 8 years ago

Last modified 8 years ago

Encapsulate discovery mechanism

Reported by: curtis Owned by: curtis
Priority: minor Milestone: imagej2-b4-plugins
Component: Plugin Framework Version:
Severity: serious Keywords:
Cc: Blocked By:


In ImageJ2 we have taken pains to encapsulate certain dependencies, in case we decide to change them out later. In particular, the event bus is very useful, but we do not want third party code to need to add the eventbus JAR file as a direct dependency, nor "import org.bushe.swing.event.*;" or similar. Instead, third party code should depend only on the ImageJ event mechanism (i.e., "import imagej.event.*;") in order to work with events.

Similarly, we should encapsulate the SezPoz dependency such that external modules do not need to add the sezpoz JAR as a direct dependency. Instead, ij-core and/or ij-ext should provide the means to query for available implementations of a particular interface annotated with a particular @interface.

The only case that will still require a direct import of SezPoz is if third party code wishes to define its own @annotation type rather than using @Plugin or @Service. In this case, it will need to "import net.java.sezpoz.Indexable;" and there is essentially nothing we can do about it, since Java annotation interfaces do not support inheritance.

Note: See TracTickets for help on using tickets.