Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Undo goes past the last commit in AbstractTextEditor


Please don't remove this behavior, I love it!  I've wanted it in other editors I use and was very pleased to see it here.

Dirty simply means contents not saved.  There's no reason the user needs to associate it with the undo stack.  If you want to implement it that way, you could mark the current element in the undo stack when a save is performed.  The file is then dirty if the current element in the undo stack is not the marked element.

There's a bug here currently (in the Java editor in 0214 at least):  if you open a file, make a change then undo it, the file is still shown as dirty.

Jay

_____________________________________
Jay Cagle
WebSphere Studio Web Tooling Development
(919) 254-6906 (t/l 444), jcagle@xxxxxxxxxx



Randy Hudson/Raleigh/IBM@IBMUS
Sent by: platform-ui-dev-admin@xxxxxxxxxxx

03/29/2002 03:23 PM
Please respond to platform-ui-dev

       
        To:        platform-ui-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-ui-dev] Undo goes past the last commit in AbstractTextEditor

       


Why am I able to undo past the last commit (Save)?  Sometimes I
accidentally type a key because I am trying to use an accelerator, and I
dirty the Editor.  I would think that I should be able to hit undo and see
what I did that *Isn't* saved.  But I can't, because undo keeps going past
that erroneous character, into things that I know I have already committed.

I find this confusing.  In fact, it's strange that doing a save removes the
Dirty flag, because if I close and reopen the text file I lose information:
the stuff that used to be undoable because it wasn't flushed.

GEF actually uses the undo stack to determine "dirty"-ness.  And, if the
user un-does overthing, the Editor is no longer dirty.

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev



Back to the top