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 42147

Summary: AntProjectHelper should fire changes in *.xml/*.properties files if they change on disk
Product: projects Reporter: Jesse Glick <jglick>
Component: AntAssignee: Jesse Glick <jglick>
Status: CLOSED FIXED    
Severity: blocker CC: phrebejk
Priority: P2 Keywords: API
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535    

Description Jesse Glick 2004-04-19 23:56:53 UTC
I.e. if the Filesystems API is used to modify
project metadata files, AntProjectEvent's should
be fired. Currently the events are only fired in
case the file is modified via the APH methods such
as putProperties or putPrimaryConfigurationData.
Comment 1 Jesse Glick 2004-04-24 02:27:05 UTC
*** Issue 42419 has been marked as a duplicate of this issue. ***
Comment 2 Jesse Glick 2004-05-01 17:24:16 UTC
Also metadata should preferably be locked (FileLock) while the data is
being modified; probably requires some kind of API change, e.g.

antProjectHelper.lockMetadata();
// show nonmodal customizer
// ...
// nonmodal customizer is closed
antProjectHelper.unlockMetadata();
Comment 3 Jesse Glick 2004-06-22 19:43:10 UTC
Have working patch for *.properties (not for *.xml).
Comment 4 Jesse Glick 2004-06-22 23:17:30 UTC
Changes in *.properties should now be fired.
Comment 5 Jesse Glick 2004-06-26 17:41:43 UTC
committed   * Up-To-Date  1.16       
ant/project/src/org/netbeans/spi/project/support/ant/AntProjectHelper.java
committed   * Up-To-Date  1.5        
ant/project/src/org/netbeans/spi/project/support/ant/ProjectProperties.java
committed   * Up-To-Date  1.12       
ant/project/test/unit/src/org/netbeans/spi/project/support/ant/AntProjectHelperTest.java
added       * Up-To-Date  1.1        
ant/project/test/unit/src/org/netbeans/spi/project/support/ant/data/project-modified.xml
Comment 6 Jaromir Uhrik 2005-07-14 16:20:05 UTC
Verified.