Description
The PrefService
stores preferences in persistent storage. But propagating a plethora of preferences in perpetuity is poison to reproducibility. So it should be a setting of the context, which is initially disabled.
Specifically, by default, when you spin up a new context, the PrefService
should not load values from persistent storage, and should not save them there either. It should keep the settings only for the lifetime of the JVM. But, if you call something like prefService.loadSettings()
then it should load the settings from persistent storage, and save them there each time as well for the lifetime of the context.
Then, we can add an ij.prefs().loadSettings()
call as one of the steps in net.imagej.Main
, so that the default application behaves that way. But people doing low-level things, unit tests, etc., will not be bitten by that inconsistency.