Hi Michael,<br><br>I apologize for the delay in my reply; I was on vacation recently and am still a bit behind on email.<br><br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<br></blockquote><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
Do you currently plan to support user defined Plugin folders in ImageJ2?<br>
</blockquote><br>Yes, we plan to support specification of an ij.plugins.path system property, similar to Java classpath, that defines the folder(s) where ImageJ plugins can be found. Actually, discovery of plugins will not be limited to this path either, but ImageJ2 will be more thorough in scanning those folders, versus other classpath elements.<br>
<br>I filed a ticket for this: <a href="http://trac.imagej.net/ticket/1208">http://trac.imagej.net/ticket/1208</a><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Furthermore I had some trouble while creating a test plugin for ImageJ2 with Eclipse and I wrote down the learned lessons because this might be usefull for other users as well.</blockquote>
<div><br></div>Yes, we need to make it easier to develop plugins in Eclipse. We have a feature ticket covering these issues:<div> <a href="http://trac.imagej.net/ticket/1207">http://trac.imagej.net/ticket/1207</a><br><br>
The main idea is to generate an Eclipse project from ImageJ, so you don't have to worry about getting these configuration settings right. And also for ImageJ to automatically update your SezPoz metadata for you, since Eclipse only does it when you clean the project.<br>
<br>The Eclipse problems have been the subject of many discussions but there is still much work to do to iron it all out.</div><div><br></div><div>Sorry,</div><div>Curtis</div><div><br><br><div class="gmail_quote">On Tue, May 15, 2012 at 3:46 AM, Michael Zinsmaier <span dir="ltr"><<a href="mailto:michael.zinsmaier@gmx.de" target="_blank">michael.zinsmaier@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Curtis and Barry,<br>
<br>
I am the new guy at KNIP and I am currently working on the ImageJ2 integration. For KNIP it would be very useful<br>
if we could load Plugins/(Runnable Modules) during runtime such that a user could select a ImageJ2 Plugin directory and KNIP browses this directory and loads the respective plugins.<br>
<br>
To my knowledge this could basically be implemented by either manipulating the classpath or with ClassLoaders to<br>
make the additional jar files visible for the PluginFinder. However due to the eclipse plugin based KNIME architecture and the class.forName calls in ImageJ2 I don't get either of these options to work.<br>
<br>
Do you currently plan to support user defined Plugin folders in ImageJ2?<br>
<br>
I attached a sample of my ClassLoader code in case that there exists a simple solution that I missed (-:<br>
Furthermore I had some trouble while creating a test plugin for ImageJ2 with Eclipse and I wrote down the learned lessons because this might be usefull for other users as well.<br>
<br>
regards Michael<br>
<br>
<br>
ClassLoader based sample Code:<br>
------------------------------<u></u>--------------------<br>
<br>
I experimented with code like this:<br>
<br>
File f = new File("MySmallPlugin.jar");<br>
<br>
ClassLoader cl = null;<br>
try {<br>
ClassLoader prev = IJ2Modules.class.<u></u>getClassLoader();<br>
cl = new URLClassLoader(new URL[] { f.toURI().toURL() }, prev);<br>
} catch (MalformedURLException e) {<br>
e.printStackTrace();<br>
}<br>
<br>
final ArrayList<PluginInfo<?>> plugins = new ArrayList<PluginInfo<?>>();<br>
PluginFinder pf = new PluginFinder(cl);<br>
pf.findPlugins(plugins);<br>
<br>
I can find my new plugin like this however the ImageJ2 classes belong as far as I understand to the "prev" classloader and class.forName will thus not work in subsequent calls.<br>
<br>
<br>
Plugin creation with Eclipse:<br>
------------------------------<u></u>----------------------------<br>
To do the experiments I created a simple Plugin with Eclipse and there are some pitfalls<br>
<br>
- one has to consider the Eclipse-specific notes of sezpoz (<a href="http://sezpoz.java.net" target="_blank">sezpoz.java.net</a> -> Notes)<br>
- it seems that the sezpoz library has to be included in the buildpath of the pluginproject although eclipse will never ask for it (I think it might be used during the jar creation to generate the annotations folder in the jar file but this is just a guess)<br>
<br>
<br>
</blockquote></div><br>
</div>