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.

Bug 158775

Summary: Support for providing initial values of properties.
Product: debugger Reporter: Martin Entlicher <mentlicher>
Component: CodeAssignee: Martin Entlicher <mentlicher>
Status: CLOSED FIXED    
Severity: blocker Keywords: API, API_REVIEW_FAST
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: The API change.
The API change with test included.

Description Martin Entlicher 2009-02-18 19:51:54 UTC
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.
Comment 1 Martin Entlicher 2009-02-18 19:55:49 UTC
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.
Comment 2 Martin Entlicher 2009-02-18 22:16:38 UTC
Created attachment 77129 [details]
The API change.
Comment 3 Martin Entlicher 2009-02-18 22:21:12 UTC
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.
Comment 4 Martin Entlicher 2009-02-19 09:53:04 UTC
Created attachment 77138 [details]
The API change with test included.
Comment 5 Martin Entlicher 2009-02-27 09:17:00 UTC
Thanks for the review, I'm going to push this API change by the COB.
Comment 6 Quality Engineering 2009-03-02 20:57:35 UTC
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.
Comment 7 Martin Entlicher 2009-03-02 21:41:38 UTC
Integrated.
Comment 8 Quality Engineering 2010-04-29 09:48:10 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.