| Summary: | [preference] Maximum number of "Undo"s | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Silvano Maffeis <silvano.maffeis> | ||||||
| Component: | Text | Assignee: | Dani Megert <daniel_megert> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P2 | CC: | alvin, billy.biggs, bogofilter+eclipse.org, david_williams, maffeis, markus.kell.r, max.gilead, mikehoeffner, mlists, nikolaymetchev, preuss, richieholes | ||||||
| Version: | 2.0 | ||||||||
| Target Milestone: | 3.1 M6 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Silvano Maffeis
I assume you mean changes in the editor, not refactoring undos. Yes, I meant in the editor. (Hi Kai, long time no see :-) is anyone fixing this? i get bitten by this shallow undo buffer all the time... The limit was probably not reached but the undo manager cleared the undo stack upon save. This has been changed for 3.0 some time ago. Please reopen if this is still a problem for using 3.0 M6 or higher. For me, it's not fixed. The undo stack is still hardcoded to 25 levels, and I also hit the limit from time to time. It's that rare situation where you forget to save for some time and you know that the version from 10 minutes ago was definitely better than the current one - but you can't reach back, since Local History is only updated on save ... How about an "Editor Undo Levels" text field in the Local History preference page, where we can already increase Local History's memory? I have just tested with Eclipse 3.0 M6 and the limit is still 25. If the limit is to remain hardcoded I think it should be at least 200 (preferably 1000+), but as Markus says ideally it would be a preference (maybe with unlimited as an option). >I have just tested with Eclipse 3.0 M6 and the limit is still 25.
I didn't say we changed it, did I? ;-)
Created attachment 7553 [details]
Change undo limit to 1000
Hardly worth a patch really, but here's one against HEAD that changes the limit
to 1000.
Simply setting increasing the limit is not a good idea since this increases the footprint. We decided to offer a preference for the Text and Java editor with a hint that this might increase the footprint. Christof, this is for M8 and not M7. ack! bit by this again! grr! :P Changing milestone to M9. . *** Bug 56557 has been marked as a duplicate of this bug. *** *** Bug 60742 has been marked as a duplicate of this bug. *** Removing mile stone. We didn't make. Blame us, but this will not happen for 3.0. Is anyone working on this? A lot of exciting changes are done with 3.1 and this would be very important addition, too. Pretty pretty please ;) Doh! this one got me again the other night. Even if it were only to increase the hard coded value from 25 to 1000 it would be better. Even raising it to 100 would be a vast improvement. Your work is greatly appreciated. [desperate mode on] Please!!! It's SO annoying to be forced to go back to local history SO often because of this small undo buffer problem. If it's so big change to make it configurable PLEASE just increase default number of undo levels to at least 100. But not 25 (and Eclipse counts every single bit of editor activity as undo entry, 25 levels is sometimes mere 5 lines of actual text!!) I can't believe this bug is almost 2 & 1/2 years old and still not resolved. I don't understand why there isn't an option to set the undo history limit? I really like eclipse but as a new Java developer this feature-lack is killing me. This is soooo weird that a product like eclipse will have this stupid bug. I guess this just shows nobody looks at bug databases. Yes, yes, it's a one line patch, but for a lot of folks who use eclipse (rather than develop on it), it's a whole lot more work to pull, change 1 line and recompile instead of getting binaries. Please please expose this in some options screen!! It's now more than two years old and it's biting me about once a week ... Created attachment 16401 [details] Undos stored on disk This patch will store undo commands on disk. This will allow an unlimited undo stack without significant footprint increase. The stack still exists in memory, but it only contains offsets to a file that contains the actual contents of the undos. An LRU of 25 undos is held in memory. Memory use is 8 bytes per undo command. I estimate this will result in 32k RAM per 1000 lines written. The size/type of the undo does not alter the amount of memory used (except for the cache) only the number of them. New undos are added to the end of the file, no attempt is made to recover space from obsolete undos until Eclipse is restarted. This patch also fixes bug 49553 (Undo should work one line at a time). Look there for more details of that part. I'm not sure how to get a java.io.File for the .metadata directory. I used Platform.getLocation().append(".metadata") but I don't know if that is correct. Sounds good. Are there instructions on how we (the users) would apply the patch? Is it part of the latest slipstream releases? If not, will it be in an official release? Unless you're concerned about memory footprint don't bother with my most recent patch. Just change src/org/eclipse/jface/text/source/SourceViewerConfiguration.java in the org.eclipse.jface.text plugin. There's a 25 in there somewhere; change it to whatever you want. I wouldn't hold your breath about this getting fixed in an official release. I have submitted 5 or 6 patches/suggested fixes over the last 18 months and only a couple of the bugs have been fixed and never with the patches I submitted and only half fixed in one case. I can empathise. Fixing bugs sucks. Fixing bugs with other people's code sucks a lot. But then having to patch your IDE every time you upgrade sucks too. Hm', I'm not quite familar with how to use the submitted patch. First ofF all it's a CVS-patch, and do NOT know how to retrieve the full code. Next, don't know where to store the Java-File and what to replace. Wouldn't it be possible to be *little* bit more eloquent, how to create a personal new 'jfacetext.jar'. Would be great! Instructions for setting up CVS are located here: http://dev.eclipse.org/cvshowto.html I've gotten so far as to check out the jfacetext tree and modify the source. I can't seem to figure out or find instructions on how to build a new jar file from the source, though. Platform UI is working on an Undo/Redo framework which Platform Text will adopt. For details see bug 37716 and: http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-ui-home/R3_1/undo-redo-proposal/undo-redo%20support.html Once this is in place we will migrate to it. If this will not make it into 3.1 then we will provide a shared text editor preference for the Maximum number of "Undo"s. Comment 27 looks very promising. But after 2 years, the team should have the gentleness to provide a preliminary official patch in a convenient _binary_ form (e.g. *.jar), thus the users have a simple solution. Alternatively, the author of Comment 22 could maybe provide his 2 solutions as a *.jar with some instructions. It is not adequate that every intrested users goes into the CVS battle to solve this very essential issue. I bump into this issue almost daily. Would really like to be able to set the number of undo's. Happy Easter! This can be configured on the Workbench > Editors > Text Editors preference page Fixed. Available in builds > 20050324. Verified *** Bug 92509 has been marked as a duplicate of this bug. *** |