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.
First, it is undocumented API. Second, this is realy ugly IMO :-( We have talket about using DirContext several times. Is not the time to start using it for stuff like that?
The DirContext could be more elegant. Svato, what are exact requirements: 1. decide whether the value is inherited or not 2. be able to iterate over all values in inheritance tree 3. iterate over the inheritance tree (even through layers where value isn't defined) Anything else? Is #3 realy required?
IMHO it is sufficient to have 1 & 2. Note that (1) and (2) are specific applications of (3). If we don't want to support context-specific settings processing, (1) and (2) could be sufficient.
I am working on this. I will remove ContextSettings.NULL_VALUE and extend ProxyContext to implement DirContext. In order to be able to find out if a setting is inherited or not I will introduce an operational attribute inherit=[Boolean.TRUE|Boolean.FALSE]. Usage will be following: ContextSettings.isPropertyDefined(name) corresponds to DirContext.getAttributes(name).get("inherit").get(); Moreover it will be possible to enumerate non-inherited settings with DirContext.search(nameOfContext, new BasicAttributes("inherit", Boolean.FALSE)); BTW does anyone know purpose of the inherit param in ContextSettings.isPropertyDefined? I would propose to remove it and rename method to isValueInhereted(name).
Prepared for integration. Incompatible API changes: in org.netbeans.spi.projects.ContextSettings: * NULL_VALUE removed * isPropertyDefined(String name, boolean inherit) changed to boolean isPropertyInhereted(String name) Compatible API changes: in org.netbeans.modules.projects.settings.ProxyContext: * implements DirContext, namely methods getAtributes(...) * introduced an operational attribute inherit=[Boolean.TRUE|Boolean.FALSE]
integrated in projects/core/src/org/netbeans/api/projects/settings/Contexts.java; new revision: 1.1.2.7; previous revision: 1.1.2.6 projects/core/src/org/netbeans/modules/projects/settings/ProxyContext.java new revision: 1.1.2.4; previous revision: 1.1.2.3 projects/core/src/org/netbeans/spi/projects/Contexts.java new revision: 1.1.2.2; previous revision: 1.1.2.1 projects/core/src/org/netbeans/spi/projects/ContextSettings.java; new revision: 1.1.2.2; previous revision: 1.1.2.1
verified
As described in http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the current work on projects prototype has been stopped. Marking issue as CLOSED.