+ Created a re-usable implementation of ProjectInformation that can be + used within the Java language projects. +
+nbproject/project.xml
and nbproject/private/private.xml
.
+ * The fragment will have no parent node and while it may be modified, you must
+ * use {@link #putPrimaryConfigurationData} to store any changes.
+ * @param shared if true, refers to project.xml
, else refers to
+ * private.xml
+ * @param useNamespace use the name space when looking for the node
+ * @return the configuration data that is available
+ */
+ public Element getPrimaryConfigurationData(final boolean shared, final boolean useNamespace) {
final String name = type.getPrimaryConfigurationDataElementName(shared);
assert name.indexOf(':') == -1;
- final String namespace = type.getPrimaryConfigurationDataElementNamespace(shared);
- assert namespace != null && namespace.length() > 0;
+ final String namespace;
+ if (useNamespace) {
+ namespace = type.getPrimaryConfigurationDataElementNamespace(shared);
+ assert namespace != null && namespace.length() > 0;
+ } else {
+ namespace = null;
+ }
return ProjectManager.mutex().readAccess(new Mutex.Action