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.

Bug 38946 - Selecting a new default target cause build.xml to be re-written with inlines expanded
Summary: Selecting a new default target cause build.xml to be re-written with inlines ...
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
Keywords: UI
Depends on: 42859
  Show dependency tree
Reported: 2004-01-16 18:52 UTC by bigfoot
Modified: 2005-07-12 10:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description bigfoot 2004-01-16 18:52:08 UTC
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.
Comment 1 Jesse Glick 2004-01-16 19:04:56 UTC
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

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.
Comment 2 Jesse Glick 2004-03-03 16:51:23 UTC
*** Issue 40714 has been marked as a duplicate of this issue. ***
Comment 3 Jesse Glick 2004-05-05 16:14:33 UTC
Will remove editing ability in D.
Comment 4 Marian Mirilovic 2005-07-12 10:02:01 UTC