Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 158775 - Support for providing initial values of properties.
Support for providing initial values of properties.
Status: CLOSED FIXED
Product: debugger
Classification: Unclassified
Component: Code
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Martin Entlicher
issues@debugger
: API, API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-18 19:51 UTC by Martin Entlicher
Modified: 2010-04-29 09:48 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


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

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 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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo