View | Details | Raw Unified | Return to bug 89599 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ui/texteditor/AbstractTextEditor.java (-1 / +10 lines)
Lines 2643-2652 Link Here
2643
2643
2644
		createNavigationActions();
2644
		createNavigationActions();
2645
		createAccessibilityActions();
2645
		createAccessibilityActions();
2646
		createUndoRedoActions();
2647
		createActions();
2646
		createActions();
2648
2647
2649
		initializeSourceViewer(getEditorInput());
2648
		initializeSourceViewer(getEditorInput());
2649
		
2650
		/* since 3.2 - undo redo actions should be created after 
2651
		 * the source viewer is initialized, so that the undo manager
2652
		 * can obtain its undo context from its document.
2653
		 */
2654
		createUndoRedoActions();
2655
2650
2656
2651
		JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);
2657
		JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);
2652
	}
2658
	}
Lines 3013-3018 Link Here
3013
				initializeSourceViewer(input);
3019
				initializeSourceViewer(input);
3014
3020
3015
				// Reset the undo context for the undo and redo action handlers
3021
				// Reset the undo context for the undo and redo action handlers
3022
				// Since 3.2 this must occur after the source viewer is initialized
3023
				// for the new input, so that the undo context is obtained from the
3024
				// new document.
3016
				IAction undoAction= getAction(ITextEditorActionConstants.UNDO);
3025
				IAction undoAction= getAction(ITextEditorActionConstants.UNDO);
3017
				IAction redoAction= getAction(ITextEditorActionConstants.REDO);
3026
				IAction redoAction= getAction(ITextEditorActionConstants.REDO);
3018
				boolean areOperationActionHandlersInstalled= undoAction instanceof OperationHistoryActionHandler && redoAction instanceof OperationHistoryActionHandler;
3027
				boolean areOperationActionHandlersInstalled= undoAction instanceof OperationHistoryActionHandler && redoAction instanceof OperationHistoryActionHandler;

Return to bug 89599