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.
New projects define a new framework for settings in which every DataObject will have a "settings context" where it can store its setting. With projects module installed, these settings will be stored in the project file. It is suggested that all modules use this new way to store their settings so that when a DataObject is added into a project, its settings are stored in the project. So this new storage for settings will supercede filesystems attributes. The question is what to do if the projects module is not present. It is not practical for modules to test presence of the projects module and then decide whether to store their settings in fs attributes or in project settings context. The proposal is to make the settings accessible thru a settings context in both cases. So a DataObject would just get its settings context and store its settings into it. Without the projects module, this settings context would be provided by core and it would be persisted in filesystem attributes. With projects module enabled, the settings context would be provided by projects module and would be persisted in project. DataObject would get the settings context from an environment provider registered in lookup.
In order to accomplish this proposal it would be useful to introduce a new method unifying the access to the JNDI context. A suitable place seems to be org.openide.loaders.Environment: /** Finds a JNDI context for a given data object. * @param obj the data object * @return the JNDI context for this data object */ public static javax.naming.Context findSettingsContext(DataObject obj); There will be a default context implementation in openide and modules like projects will be able to plug own impl in by registering Environment.Provider in the system Lookup.
Implemented in http://openide.netbeans.org/source/browse/openide/src/org/openide/loaders/Environment.java.diff?r1=1.7&r2=1.8 http://openide.netbeans.org/source/browse/openide/src/org/openide/loaders/DefaultSettingsContext.java?rev=1.1&content-type=text/x-cvsweb-markup + xtest http://openide.netbeans.org/source/browse/openide/test/unit/src/org/openide/loaders/DefaultSettingsContextTest.java?rev=1.1&content-type=text/x-cvsweb-markup Later if it would be necessary then the default implementation can be extended to support settings persisted with settings convertors. Possible variant would be to place the support to new module core/localfs as Jarda pointed out.
i've verified all these issues
closing all my verified issues