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.
Summary: | FileRename refactoring can not be undo | ||
---|---|---|---|
Product: | xml | Reporter: | Nam Nguyen <nnguyen> |
Component: | Schema Tools | Assignee: | Nam Nguyen <nnguyen> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
fix
A simpler and more effective fix. |
Description
Nam Nguyen
2006-10-10 08:44:12 UTC
This happen on the second refactorings since the start of the IDE. The main cause of this "regression" is from the use of RefactoringManager.isRunning(UsageSet) to filter out noise events. Since this filtering is less restrictive, the noise events from previous UsageSet listner could reach RefactoringManager causing reset of undo managers. The fix is to turn off listening on previous refactored models at the start of processing the next refactoring. Also, fix in this change is typo causing memory leaks on listeners attached to GeneralChangeExecutor. Fix checked into release55_dev: /cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/Attic/RefactoringManager.java,v <-- RefactoringManager.java new revision: 1.1.2.10.2.5; previous revision: 1.1.2.10.2.4 /cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/Attic/UsageSet.java,v <-- UsageSet.java new revision: 1.1.2.7.2.4; previous revision: 1.1.2.7.2.3 /cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/impl/Attic/GeneralChangeExecutor.java,v <-- GeneralChangeExecutor.java new revision: 1.1.2.1.2.1; previous revision: 1.1.2.1 /cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/impl/Attic/RefactoringUtil.java,v <-- RefactoringUtil.java new revision: 1.1.2.13.2.2; previous revision: 1.1.2.13.2.1 /cvs/xml/refactoring/src/org/netbeans/modules/xml/refactoring/impl/Attic/Bundle.properties,v <-- Bundle.properties new revision: 1.1.2.11.2.2; previous revision: 1.1.2.11.2.1 /cvs/xml/schema/core/test/unit/src/org/netbeans/modules/xml/schema/core/Attic/SchemaRefactoringTest.java,v <-- SchemaRefactoringTest.java new revision: 1.1.2.15.2.4; previous revision: 1.1.2.15.2.3 Created attachment 35082 [details]
fix
A much smaller change is needed. We only need to make sure we detach the RefactoringManager listener from old usage set together with clear old undo support before processing the next refactoring. Created attachment 35097 [details]
A simpler and more effective fix.
Fix committed to release55. *** Issue 86899 has been marked as a duplicate of this issue. *** verified in 061011_1 |