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.
dev 200408241800 Steps: - open any java file - use Undo (Ctrl-Z) -> The file is empty
I think that it's likely caused by the yesterday's integration of the issue 47022. Reassigning to openide/editor for evaluation.
CCing Yarda, teh integrator of #47022
The problem does not happen with swing PlainDocument, just with specific NetBeans document. The reasons is that we run some code in NbDocument.runAtomic(Runnable) and at the end of runnable we attach UndoRedoListener. The problem with NetBeans document implementation is that at the end of the atomic action it fires changes to current listeners even they were not registered at the time the changes were made. I have hard time to fix it in CES, so I suggest the editor module to reimplement this functionality to deliver events only to listeners registered at the begining of the atomic action. I hope that will be possible, it will definitively be more meaningful.
*** Issue 47987 has been marked as a duplicate of this issue. ***
Mila, this must be fixed for NB4.0 , user can easy remove whole content of the opened file.
Happened to me too - was holding CTRL-Z till the end + CTRL-S + CTRL-F4 just to later realize that my file is totally empty. Was lucky because I could update it from CVS.
I'm already working on the fix. I should be able to integrate it tomorrow.
Fixed in main trunk: Checking in libsrc/org/netbeans/editor/BaseDocument.java; /cvs/editor/libsrc/org/netbeans/editor/BaseDocument.java,v <-- BaseDocument.java new revision: 1.108; previous revision: 1.107
Verified in dev build 200408301800. The Ctrl-Z is disabled after opening java file.
*** Issue 48189 has been marked as a duplicate of this issue. ***
*** Issue 48589 has been marked as a duplicate of this issue. ***