Lines 109-114
Link Here
|
109 |
import org.eclipse.jface.text.ITextListener; |
109 |
import org.eclipse.jface.text.ITextListener; |
110 |
import org.eclipse.jface.text.ITextOperationTarget; |
110 |
import org.eclipse.jface.text.ITextOperationTarget; |
111 |
import org.eclipse.jface.text.ITextSelection; |
111 |
import org.eclipse.jface.text.ITextSelection; |
|
|
112 |
import org.eclipse.jface.text.ITextViewer; |
112 |
import org.eclipse.jface.text.ITextViewerExtension; |
113 |
import org.eclipse.jface.text.ITextViewerExtension; |
113 |
import org.eclipse.jface.text.ITextViewerExtension5; |
114 |
import org.eclipse.jface.text.ITextViewerExtension5; |
114 |
import org.eclipse.jface.text.ITextViewerExtension6; |
115 |
import org.eclipse.jface.text.ITextViewerExtension6; |
Lines 2643-2652
Link Here
|
2643 |
|
2644 |
|
2644 |
createNavigationActions(); |
2645 |
createNavigationActions(); |
2645 |
createAccessibilityActions(); |
2646 |
createAccessibilityActions(); |
2646 |
createUndoRedoActions(); |
|
|
2647 |
createActions(); |
2647 |
createActions(); |
2648 |
|
2648 |
|
2649 |
initializeSourceViewer(getEditorInput()); |
2649 |
initializeSourceViewer(getEditorInput()); |
|
|
2650 |
|
2651 |
/* since 3.2 - undo redo actions should be created after |
2652 |
* the source viewer is initialized, so that the undo manager |
2653 |
* can obtain its undo context from its document. |
2654 |
*/ |
2655 |
createUndoRedoActions(); |
2656 |
|
2650 |
|
2657 |
|
2651 |
JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener); |
2658 |
JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener); |
2652 |
} |
2659 |
} |
Lines 3013-3018
Link Here
|
3013 |
initializeSourceViewer(input); |
3020 |
initializeSourceViewer(input); |
3014 |
|
3021 |
|
3015 |
// Reset the undo context for the undo and redo action handlers |
3022 |
// Reset the undo context for the undo and redo action handlers |
|
|
3023 |
// Since 3.2 this must occur after the source viewer is initialized |
3024 |
// for the new input, so that the undo context is obtained from the |
3025 |
// new document. |
3016 |
IAction undoAction= getAction(ITextEditorActionConstants.UNDO); |
3026 |
IAction undoAction= getAction(ITextEditorActionConstants.UNDO); |
3017 |
IAction redoAction= getAction(ITextEditorActionConstants.REDO); |
3027 |
IAction redoAction= getAction(ITextEditorActionConstants.REDO); |
3018 |
boolean areOperationActionHandlersInstalled= undoAction instanceof OperationHistoryActionHandler && redoAction instanceof OperationHistoryActionHandler; |
3028 |
boolean areOperationActionHandlersInstalled= undoAction instanceof OperationHistoryActionHandler && redoAction instanceof OperationHistoryActionHandler; |
Lines 4774-4779
Link Here
|
4774 |
if (Control.class.equals(required)) |
4784 |
if (Control.class.equals(required)) |
4775 |
return fSourceViewer != null ? fSourceViewer.getTextWidget() : null; |
4785 |
return fSourceViewer != null ? fSourceViewer.getTextWidget() : null; |
4776 |
|
4786 |
|
|
|
4787 |
if (ITextViewer.class.equals(required)) |
4788 |
return fSourceViewer; |
4789 |
|
4777 |
return super.getAdapter(required); |
4790 |
return super.getAdapter(required); |
4778 |
} |
4791 |
} |
4779 |
|
4792 |
|