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 - Support for providing initial values of properties.
Summary: Support for providing initial values of properties.
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
Depends on:
Reported: 2009-02-18 19:51 UTC by Martin Entlicher
Modified: 2010-04-29 09:48 UTC (History)
0 users

See Also:
Exception Reporter:

The API change. (15.67 KB, text/plain)
2009-02-18 22:16 UTC, Martin Entlicher
The API change with test included. (27.81 KB, text/plain)
2009-02-19 09:53 UTC, Martin Entlicher

Note You need to log in before you can comment on or make changes to this bug.
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 (upload may still be in progress)
Log: #158775 - Intrduction of Properties.Initializer.
Comment 7 Martin Entlicher 2009-03-02 21:41:38 UTC
Comment 8 Quality Engineering 2010-04-29 09:48:10 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.