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.
My build.xml file uses includes (filenames prepended with '&') to help us manage a large hierarchy of build.xml files accross many products. We also have a certain way we like to format our build.xml files. When I use the properties editor for the build.xml file in the IDE and select a new default run target, the build.xml file is re- written onto the file system without warning. All of the includes are expended and the file is completely re-formatted. I then have to go re- write my build.xml file to get it back (I could not see a build.xml~ backup anywhere - that would have been nice). I think that this feature should warn about these types of changes, or the IDE should detect that includes were used and either attempt to maintain the integrity of the include structure or give a stern warning to the user that they are about to clobber thaeir existing structure.
See also issue #21728, and the Ant FAQ (see URL). Issue #20532 is about creating a stable API to manipulate *any* XML files structurally without loss of formatting. Unfortunately it seems there is no one working on this (for a long time now), and it is not a good idea to try to implement it in the Ant module. While this might be fixed, it seems more likely that all the structural UI would simply be made read-only. Downgrading to P3 since the FAQ item exists and the issue has been true for the whole lifetime of the Ant module. If you version-control scripts, don't use the property sheet / Explorer nodes to make edits; use the text editor (there is a code completion module available which is essentially as powerful anyway). Not sure if retaining entity includes is possible. Probably. Note that Ant 1.6 supports <import> which will not be expanded in this way and is also more powerful. Leaving open for new suggestions, esp. re. warning the user about possible reformatting before continuing.
*** Issue 40714 has been marked as a duplicate of this issue. ***
Will remove editing ability in D.
closed