This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Debugger settings are traditionally stored into a properties file through o.n.a.d.Properties API. The client of this API can use Properties.getObject (String propertyName, Object defaultValue) to retrieve a property value. It the property is accessed at more places (Options GUI, program logic, etc.), there is a problem when the "defaultValue" is more complex. At all places when the value is retrieved (and that can be even different modules), one have to provide the same default value. But it's not desired to copy that default value to all such places. There is a risk of loosing synchronicity. A central point where the default values can be defined is necessary.
The proposal is to have an interface, e.g. Properties.Initializer (similar to Properties.Reader), whose implementation can be registered into the Lookup and which can provide the default values of properties.
Created attachment 77129 [details] The API change.
Please review this simple API addition. Properties.Initializer interface is added. Test will be attached soon, so far the correct functionality was verified on a class initializing JPDA debugger options.
Created attachment 77138 [details] The API change with test included.
Thanks for the review, I'm going to push this API change by the COB.
Integrated into 'main-golden', will be available in build *200903021401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8f7521bd12b3 User: mentlicher@netbeans.org Log: #158775 - Intrduction of Properties.Initializer.
Integrated.
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.