NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #723 (closed defect: fixed)

Opened 2011-08-15T13:40:25-05:00

Last modified 2011-11-14T10:58:54-06:00

Clear Preferences Plugin

Reported by: gharris Owned by: bdezonia
Priority: major Milestone: imagej2-b1-initial
Component: Plugins Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

Add a plugin to clear the IJ2 Preferences, thus falling back to the default parameter values.

Change History

comment:1 Changed 2011-09-02T09:59:55-05:00 by gharris

  • Milestone changed from imagej-2.0-alpha5 to imagej-2.0-beta1

comment:2 Changed 2011-09-09T11:20:15-05:00 by curtis

  • Owner changed from gharris to bdezonia
  • Status changed from new to assigned

Assigning to Barry since he is working on the Options code.

comment:3 Changed 2011-09-19T12:44:20-05:00 by bdezonia

Grant, can you clarify this? Do you mean reset the values of the OptionsPlugins? (Arrow Size, Font, Threads, etc.) Or do you mean for all plugins/preferences in the whole program and user plugins?

comment:4 Changed 2011-09-19T14:21:41-05:00 by gharris

Given that we are using the Prefs API, if we just remove all of the entries (from the backstore/registry), it effectively resets all defaults. (AFAIK, anything that gets a Pref value needs to provide a default.)

comment:5 Changed 2011-09-19T16:30:05-05:00 by bdezonia

682a930c788b5292f633162ec5e9a34280e8fe6a contains an implementation of a reset options plugin. so it does not clear everything but could be extended if needed.

implementation was straightforward. need to test a couple things:

1) if reset is run are there synchronization issues (like options dialogs load their fields correctly but are there existing settings in use that need to be updated?)

2) attempted to test if code is working. Process > Math > Divide relies on divide by zero value from Edit > Options > Misc. Should be able to set DBZ val to something like 10 and run Process > Math > Divide and pass 0 as value. This should set input image to all 10's. Unfortunately it is not working. In DivideDataValuesBy the call to getOption() is always returning "infinity" (the default value in the options dialog) rather than the currently set value. Determine why.

comment:6 Changed 2011-09-20T09:50:08-05:00 by bdezonia

2) fixed in 3741d1d14046f114349fa662f73cdfb0c7426f15 and 50c60bbd1cb3b90d73425a86a1395ea1842884c8

comment:7 Changed 2011-09-20T09:55:01-05:00 by bdezonia

After some testing I don't think 1) is an issue.

All that is left to do is determine whether resetting Options defaults is enough. Or do we need to reset all imagej.* prefs (such as other dialogs' values. This could affect 3rd party plugins if they use the IJ2 Prefs mechanism.

comment:8 Changed 2011-09-20T10:07:07-05:00 by gharris

How about reset the Options settings and have an option to reset ALL (meaning imagej.*) ?

comment:9 Changed 2011-10-13T13:45:18-05:00 by bdezonia

  • Component changed from ij-ext to ij-plugins

comment:10 Changed 2011-11-14T10:58:54-06:00 by bdezonia

  • Status changed from assigned to closed
  • Resolution set to fixed

In b7bc8516a7e860272675d9b621be3d9967845a8e added ability for ShowPrefs plugin to clear existing preferences