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.
Make the org.netbeans.spi.project.support.ant.EditableProperties a public utility class, i.e. move it to a package like org.openide.util.EditableProperties. EditableProperties class is similar to java.util.Properties but it is designed to retain additional information needed for safe hand-editing. Making this class publicly available would be a great benefit to any module that have to deal with properties file editing. An example here is the tomcatint module that has to edit the catalina.properties file. As Jesse pointed out, the main problem is that we cannot simply deprecate the original version in ant/project because it is used in the signatures of other ant/project API methods: http://www.netbeans.org/download/dev/javadoc/org-netbeans-modules-project-ant/org/netbeans/spi/project/support/ant/class-use/EditableProperties.html Here are some possibilities how to do the change, although non of them seems to be convenient enough 1. all the methods referring to the old EditableProperties could also be deprecated and replaced by the new version 2. the old EditableProperties could inherit from the new EditableProperties, if they are left non final 3. the old EditableProperties public methods could delegate to those in the new EditableProperties I would like to discuss here whether and how to do this api change.
This is IMO a subset of issue #65229, which I would like to adress (at least partially) for a future realease.
You are right -> duplicate *** This issue has been marked as a duplicate of 65229 ***
Closing duplicate, reopening this.
Created attachment 85097 [details] Proposed patch
Using sherold's strategy #3. Please review.
ruby.rakeproject/src/org/netbeans/modules/ruby/spi/project/support/rake/EditableProperties.java can probably also be deleted, since it is only in a friend package. tomcat5/src/org/netbeans/modules/tomcat5/util/EditableProperties.java can definitely be deleted, and probably also compapp.projects.jbi/catdsrc/org/netbeans/modules/compapp/catd/util/EditableProperties.java.
core-main #d3c768524b90
Integrated into 'main-golden', will be available in build *200907300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d3c768524b90 User: Jesse Glick <jglick@netbeans.org> Log: Issue #66577: make EditableProperties available even without a dep on project.ant; generally useful.