Hi,
On Sat, 5 Feb 2011, Stephan Saalfeld wrote:
> the easiest way to get that behavior is to store the paremeters in
> static fields. That way, all instances of the plugin share common
> parameters until the class is reloaded (read, usually during the
> lifetime of an ImageJ instance). Doing so, it is a good idea to copy
> these static fields into local fields of the plugin and access only the
> local fields from the run method. That effectively prevents bogus cross
> talking of multiple instances of the plugin running in parallel.
This is a good method, but there are two things to mention in addition:
- the class is reloaded upon Help>Refresh Menus (i.e. whenever you install
a plugin, even without restarting ImageJ, all plugin classes are
reloaded),
- you could persist the values even past a File>Quit by using ij.Prefs as
described here:
http://pacific.mpi-cbg.de/Tips_for_developers#How_to_store_settings_persistentlyI would also think that the plugin architecture in ImageJ2 allows you to
have persistent settings even without the plugin programmer taking care of
it explicitly.
Ciao,
Johannes