Skip to content

Commit 6fe0553

Browse files
committed
DefaultPrefService: add TODO
Added comments detailing planned future for the pref service.
1 parent 9050328 commit 6fe0553

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/org/scijava/preferences/DefaultPrefService.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@
5353
@Plugin(type = Service.class)
5454
public class DefaultPrefService extends AbstractPrefService {
5555

56+
// TODO - with the conversion from a static utility class to a service, we
57+
// have unfortunately lost some power to adapt behavior to individual data
58+
// types - either the whole service is superceded, or it's not. For example,
59+
// see the saveValue/loadValue of the ModuleItem class, where each item could
60+
// decide how it was saved and loaded.
61+
// Thus it would be nice to refactor this service to use the Handler pattern,
62+
// such that there would just be a few base put/get methods that delegated
63+
// to appropriate handlers. Then the handlers of a single type could be
64+
// provided and overridden.
65+
5666
// -- Global preferences --
5767

5868
@Override

0 commit comments

Comments
 (0)