Hi Lee,<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
Looks like a good start. Is NetBeans going to be required for IJ2?
It would be nice, esp. for CellProfiler, to have some static method
that would find the plugin finders, but if NetBeans is in, the code
to do so ourselves does not look too complex.<br></blockquote>
<br>"NetBeans" is actually a collection of quite a few different modules. We will be using them piecemeal in places where it makes sense. For the ImageJ2 GUI, we will likely use the NetBeans RCP as a whole, but it will not be required to use ImageJ as a library.<br>
<br>In the case of plugin discovery, we are using the NetBeans Lookup module to access all plugin finders. This takes the form of a simple method call:<br> Lookup.getDefault().lookupAll(PluginFinder.class).<br><br>Alternately, you can instantiate specific PluginFinder implementations and ask them to discover plugins with something like:<br>
List<PluginEntry> plugins = new ArrayList<PluginEntry>();<br> new Ij1PluginFinder().findPlugins(plugins);<br><br>But ultimately there will indeed be a simple static method that returns all the plugins found by all registered plugin finders. This will likely be the easiest method for external applications like CellProfiler to use.<br>
<br>-Curtis<br><br><div class="gmail_quote">On Tue, Nov 23, 2010 at 7:22 AM, Lee Kamentsky <span dir="ltr"><<a href="mailto:leek@broadinstitute.org">leek@broadinstitute.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">
Hi Curtis,<br>
<br>
Looks like a good start. Is NetBeans going to be required for IJ2?
It would be nice, esp. for CellProfiler, to have some static method
that would find the plugin finders, but if NetBeans is in, the code
to do so ourselves does not look too complex.<br>
<br>
--Lee<div><div></div><div class="h5"><br>
<br>
On 11/22/2010 6:52 PM, Curtis Rueden wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">Hi Grant et. al,<br>
<br>
Today Rick & I added a simple plugin discovery mechanism to
the ImageJ2 codebase. This is a work in progress. The idea is to
have an interface, PluginFinder, that provides a method,
findPlugins(List<PluginEntry> plugins), for populating a
list with discovered plugins. The IJ1 compatibility layer can have
an Ij1PluginFinder that discovers IJ1 plugins, and the ImageJ2
code can have an Ij2PluginFinder (or whatever) for discovering any
additional plugins of various types.<br>
<br>
Here is what we have so far:<br>
<br>
In ij2-common:<br>
+ imagej.plugin.PluginEntry -- very simple data structure for a
single plugin entry, including plugin class name, and associated
menu entry<br>
+ imagej.plugin.PluginFinder -- interface for anything capable
of discovering ImageJ plugins -- has one method:
findPlugins(List<PluginEntry> plugins)<br>
<br>
In ij1-bridge:<br>
+ imagej.ij1bridge.plugin.Ij1PluginFinder -- implementation for
discovering ImageJ 1.x plugins -- delegates to ij.Menus where
possible<br>
<br>
In ijx:<br>
+ ijx.plugin.IjxPluginFinder -- currently a dummy implementation
that just populates a single fake plugin entry -- eventually will
discover ImageJ 2.x plugins<br>
<br>
Tester class (in ijx):<br>
+ ijx.plugin.PluginDiscovery -- obtains all implementations of
PluginFinder interface (using NB Lookup), discovers all available
plugins and prints out the list<br>
<br>
Again, this is a work in progress. The goal is have a very simple,
encapsulated way of querying for plugins without any assumptions
about GUIs, etc. The PluginEntry in particular will need to be
fleshed out with more details—e.g., there is no way to express the
arg string needed by many IJ1 plugins/commands, no way to link an
image icon for use with a toolbar, and no way to express order for
menus or toolbars.<br>
<br>
More later; comments welcome any time.<br>
<br>
-Curtis<br>
</div></div><pre><fieldset></fieldset>
_______________________________________________
ImageJ-devel mailing list
<a href="mailto:ImageJ-devel@imagejdev.org" target="_blank">ImageJ-devel@imagejdev.org</a>
<a href="http://imagejdev.org/mailman/listinfo/imagej-devel" target="_blank">http://imagejdev.org/mailman/listinfo/imagej-devel</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagejdev.org">ImageJ-devel@imagejdev.org</a><br>
<a href="http://imagejdev.org/mailman/listinfo/imagej-devel" target="_blank">http://imagejdev.org/mailman/listinfo/imagej-devel</a><br>
<br></blockquote></div><br>