Lines 53-58
Link Here
|
53 |
private static final Object PROP_STORING = new Object (); |
53 |
private static final Object PROP_STORING = new Object (); |
54 |
/** property that holds a Map<String,Object> that stores old values */ |
54 |
/** property that holds a Map<String,Object> that stores old values */ |
55 |
private static final Object PROP_ORIGINAL_VALUES = new Object (); |
55 |
private static final Object PROP_ORIGINAL_VALUES = new Object (); |
|
|
56 |
/** this represent null in the map in PROP_ORIGINAL_VALUES */ |
57 |
private static final Object NULL = new Object (); |
56 |
|
58 |
|
57 |
/** Default constructor. */ |
59 |
/** Default constructor. */ |
58 |
public SystemOption() { |
60 |
public SystemOption() { |
Lines 68-74
Link Here
|
68 |
protected void firePropertyChange ( |
70 |
protected void firePropertyChange ( |
69 |
String name, Object oldValue, Object newValue |
71 |
String name, Object oldValue, Object newValue |
70 |
) { |
72 |
) { |
71 |
if (name != null && oldValue != null) { |
73 |
if (name != null && getProperty ("org.openide.util.SharedClassObject.initialize") == null) { // NOI18N |
72 |
Map originalValues = (Map)getProperty (PROP_ORIGINAL_VALUES); |
74 |
Map originalValues = (Map)getProperty (PROP_ORIGINAL_VALUES); |
73 |
if (originalValues == null) { |
75 |
if (originalValues == null) { |
74 |
originalValues = new HashMap (); |
76 |
originalValues = new HashMap (); |
Lines 80-86
Link Here
|
80 |
originalValues.put (name, new Box (oldValue)); |
82 |
originalValues.put (name, new Box (oldValue)); |
81 |
} else { |
83 |
} else { |
82 |
// regular usage of putProperty (....); |
84 |
// regular usage of putProperty (....); |
83 |
originalValues.put (name, oldValue); |
85 |
originalValues.put (name, oldValue == null ? NULL : oldValue); |
84 |
} |
86 |
} |
85 |
} |
87 |
} |
86 |
} |
88 |
} |
Lines 140-146
Link Here
|
140 |
ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, ex); |
142 |
ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, ex); |
141 |
} |
143 |
} |
142 |
} else { |
144 |
} else { |
143 |
putProperty (e.getKey (), e.getValue ()); |
145 |
putProperty (e.getKey (), e.getValue () == NULL ? null : e.getValue ()); |
144 |
} |
146 |
} |
145 |
} |
147 |
} |
146 |
// reset all remembered values |
148 |
// reset all remembered values |