diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java index e49283c0e25..df58e6d0375 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java @@ -541,10 +541,8 @@ public class IndentAction extends TextEditorAction { * @return the current document or null */ private IDocument getDocument() { - ITextEditor editor= getTextEditor(); if (editor != null) { - IDocumentProvider provider= editor.getDocumentProvider(); IEditorInput input= editor.getEditorInput(); if (provider != null && input != null) @@ -563,7 +561,6 @@ public class IndentAction extends TextEditorAction { private ITextSelection getSelection() { ISelectionProvider provider= getSelectionProvider(); if (provider != null) { - ISelection selection= provider.getSelection(); if (selection instanceof ITextSelection) return (ITextSelection) selection;