Community
Participate
Working Groups
The undo stack should be flushed when a Save is performed. Also, the dirty bit should be set to false when there is nothing left to undo. This is the case where the contents of the editor are identical to the contents on disk.
Absolutely not. With autobuilding on, you often don't realize that something was a bonehead mistake until after you save and autobuild completes. In my experience undo is most useful right after I save.
I agree with the 2nd part that the dirty bit should be set to false, when you go back to the state of when the editor was first opened. However, I agree with Jared that undo should be allowed to go past save.
I can live with just the second request. The most common case for me, since I use a lot of mnemonics, is that a character gets dumped in the Editor by accident. Allowing undo to "clean" the dirty flag would solve my 80% case. I'm guessing this will be implemented in UI, not JDT. But I wanted to bring it up as a Java thing since people are most religious about source code.
Remember that Redo must also reset the dirty-flag.
undo should be kept as much as possible. example: state 1> I open the file, state 2> make some modifications, (dirty bit on) state 3> save the file, (dirty bit off) state 4> make some modifications, (dirty bit on) state 5> go back to <3> with undo,undo, (dirty bit off!) state 6> again undo so i am now in <2>, dirty bit again to ON. (then redo to <3> will set dirty bit to off and again redo so <4> will set the dirty bit again to on then we can do everything and still know when it is the same as on disk
*** This bug has been marked as a duplicate of 2281 ***
I concur with Randy and Johan--the dirty bit should be reset when undo or redo match what is on disk, but the undo buffer should go back as far as you have memory to go. If the behavior proposed in this bug is implemented, I propose that it be made an option configurable via preferences (the Borland IDEs do this). Dave Orme