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
* @see JavaEditor#createJavaSourceViewer(Composite, IVerticalRuler, int)
	 */
	protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
		return new AdaptedSourceViewer(parent, ruler, styles);
	}
	
	/*
	 * @see JavaEditor#synchronizeOutlinePageSelection()
	 */
	public void synchronizeOutlinePageSelection() {
		
		if (isEditingScriptRunning())
			return;
		
		ISourceViewer sourceViewer= getSourceViewer();
		if (sourceViewer == null || fOutlinePage == null)
			return;
			
		StyledText styledText= sourceViewer.getTextWidget();
		if (styledText == null)
			return;
		
		int offset= sourceViewer.getVisibleRegion().getOffset();
		int caret= offset + styledText.getCaretOffset();
		
		IJavaElement element= getElementAt(caret, false);
		ISourceReference reference= getSourceReference(element, caret);
		if (reference != null)
			fOutlinePage.select(reference);
	}