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.
How to reproduce: - open an existing file (for instance, test.php) - edit the file - save it as 'test2.php' - try to undo changes Undo will not work anymore because the file is reopened. This is unintuitive and unexpected from users' point of view and has just caused a loss of some precious code in my case (no, unfortunately it was not in SVN yet :( ). I agree Undo should not be relied upon, but if you are editing a file and discover that you will need the old version as well as new, then you need a way to get both of the versions. In all IDEs I have used the way out is Save As + Undo - but not in NetBeans. I am not sure this is the correct place to report this (too many categories) - if not, please move to correct place.
This issue is about the Undo actions that are accessible for a file opened in the editor. Please, reassign it to a correct component. (May be it is editor/code?) Proposed scenario can be considered as valid: * An Undo actions stack for a file should be accessible for a user during a session, i.e. until restart of the IDE. * The actions like as "Save" ans "Save As..." should not clear the Undo actions stack. * In case of "Save As...", the Undo actions stack of old file should be reassigned to a newly created and re-opened file.
Reassigning to editor, not sure though.
I will check what happens but I am afraid it is be design ie. current behavior is given by design. I assume new document is created.
Even if a new document is created the Undo stack should be assigned to it. From user's point of view I see no reason not to do that. If this is not a viable solution, the user should at least be notified that saving under a new name will lose the undo stack (but this is an ugly solution - marking the trap instead of removing it :). I probably won't fall in the same trap because I have learned to avoid it (it took me a few hours to rewrite the code again), but it makes "Save as" much less usable (to me at least).
Bug prior to 7.0, not touched for the last 2 years --> P4.