Bug 138591 - Redo is disabled when you save the file
Redo is disabled when you save the file
Status: RESOLVED DUPLICATE of bug 21237
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar
6.x
All All
: P3 with 6 votes (vote)
: 6.x
Assigned To: issues@editor
issues@editor
:
: 154652 168303 170830 (view as bug list)
Depends on: 48427
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-30 09:58 UTC by Petr Dvorak
Modified: 2011-11-14 19:06 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Dvorak 2008-06-30 09:58:40 UTC
Product Version: NetBeans IDE Dev (Build 200806300101)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b12
System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)

Redo is disabled when you save the file. I think there is no need for it, or is it (as designed???)?

Steps:

1. create a new java class
2. modify the content of the file
3. try to undo and redo changes for a few times (do NOT save the file meanwhile)
-> both undo and redo works as expected
4. now undo all (or just some of...) your changes and press Ctrl+S to save the file
-> redo is disabled, you cannot redo your changes after the save
Comment 1 Vitezslav Stejskal 2008-07-14 16:03:26 UTC
Not sure why it behaves the way how it behaves. I would certainly expect either both undo/redo to get disabled (ie.
saving clears the undo/redo manager) or both of them to stay enabled (ie. the undo/redo manager is not affected by saving).
Comment 2 Petr Dvorak 2008-08-29 18:22:19 UTC
I think this chould be fixed/resolved in the 6.5 release version - you can't redo your changes once you save a file,
this is not very handy sometimes...

> I would certainly expect either both undo/redo to get disabled (ie. saving clears the undo/redo manager) or both
> of them to stay enabled (ie. the undo/redo manager is not affected by saving).

The second possibility is what I would expect...

Well, I believe the problem is that save event is currently considered an editor event, therefore creating a "new
branch" in the event history (as if you started typing something)...

Comment 3 Miloslav Metelka 2008-09-01 10:51:01 UTC
This issue depends on issue 21237 (each undoable edit needs to be wrapped and the save points marked inside the wrapper
instead of creation of extra save edits that cause the rest of undo queue to be cleared) and also on the current
remove-trailing-WS functionality because it adds extra edits for the removed WS at save time. This is more tricky to
resolve (unless we would remove the whole functionality) - please see my comment in issue 13063 of a possible solution
(unfortunately it's too late to start to implement that now during stabilization phase since I already know that there
would be additional non-trivial changes necessary at least for java and probably other modules too).
BTW I've tested other java IDEs and I've seen redo disabled after save too.
Also any additional work-at-save-time requests e.g. doing some sort of reformat at save time etc. lead to the same
problem so I'm wondering whether we shouldn't relax this requirement completely.
Comment 4 Petr Dvorak 2008-09-01 11:10:28 UTC
OK, let's postpone it for a while...

> BTW I've tested other java IDEs and I've seen redo disabled after save too.

Well, it is possible - they might have the same defect.

Try something simpler: gedit or OpenOffice Writer. Undo/Redo remains enabled after save. This is what a text (code)
editor should do IMO, but I don't want to push it too hard... I just thought it should be simple to fix:-/...
Comment 5 Petr Dvorak 2008-12-05 11:07:43 UTC
*** Issue 154652 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Prox 2009-08-25 10:32:10 UTC
*** Issue 170830 has been marked as a duplicate of this issue. ***
Comment 7 nbphpuser 2009-11-19 04:17:58 UTC
My vote for this

Duplicates

120981
168303
138591
21237
Comment 8 Ondrej Vrabec 2009-11-19 04:20:59 UTC
*** Bug 168303 has been marked as a duplicate of this bug. ***
Comment 9 Vitezslav Stejskal 2010-04-14 08:42:08 UTC

*** This bug has been marked as a duplicate of bug 21237 ***
Comment 10 shiroamada 2010-06-23 05:41:25 UTC
since so long why this haven't fix it... it really frustrated.. I think this is very high priority for this. Redo and Undo always use for testing coding purpose, after undo and save not able to redo, it is really frustrated. Hopefully Netbean team can take care for this kind of basic need.
Comment 11 nbphpuser 2010-06-23 07:23:49 UTC
I can't believe NB doesn't support this basic editing feature. In web development it is very often the case one tries things out and then discard them. Well, not possible with NB...
Comment 12 Vitezslav Stejskal 2010-06-23 09:01:04 UTC
Folks, this defect has been duplicated to issue #21237. I think you should be adding your comments there. Thanks a lot

*** This bug has been marked as a duplicate of bug 21237 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo