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.
1. Create new java project 2. Create new package "mypackage" 3. Add to mypackage new java class ClassA 4. Add to mypackage new file EmptyFile.pass 5. Copy class ClassA 6. Past refactored copy of ClassA as ClassB into mypackage 7. Make some changes in ClassB (e.g. add some methods, vars...), assume you have spend all day on ClassB and now you are very happy, that you are finally done 8. Rename EmptyFile.pass to MyEmptyFile.pass 9. Now you noticed, that MyEmptyFile.pass looks too strange so you select the project and press Undo 10. NB asks you if you really want to undo copy ClassB, but you expect it asks you something like "Do you really want to undo rename?" so you don'read dialog and press Undo 11. Oops, ClassB have been deleted, so you press Redo and it's created again >> You are very angry, when you find out, that now ClassB looks like in step (6) and all day work have been lost. Fortunately, user may update ClassB from local history of ClassB, but he may not know about this feature. Product Version: NetBeans IDE 7.4 RC1 (Build 201309152201) Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
The problem is specific to the Java Refactoring Copy Class. The implementation wrongly bypasses the transaction registration.
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.