Bug 20040 java editor: undo does not work correctly
20020612 .create new class .'override methods...' - add clone() .undo .redo .undo the plain text editor does not exhibit this mis-behavior you're left with garbage like (pressing undo/redo more times produces even more garbage): public class Dfg { r.clone(); //<<GARBAGE } //<<GARBAGE }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
			ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
			
			if (unit != null) {
				synchronized (unit) { 
					performSaveOperation(createSaveOperation(false), progressMonitor); 
				}
			} else 
				performSaveOperation(createSaveOperation(false), progressMonitor);
		}
	}
	
	/**
	 * Jumps to the error next according to the given direction.
	 */
	public void gotoError(boolean forward) {
		
		ISelectionProvider provider= getSelectionProvider();
		
		if (fStatusLineClearer != null) {
			provider.removeSelectionChangedListener(fStatusLineClearer);
			fStatusLineClearer= null;
		}
		
		ITextSelection s= (ITextSelection) provider.getSelection();
		Position errorPosition= new Position(0, 0);
		IProblemAnnotation nextError= getNextError(s.getOffset(), forward, errorPosition);
		
		if (nextError != null) {