void (final PsiFile file) { try { if (myTextRange == null) { CodeStyleManager.getInstance(getProject()).reformat(file); } else { CodeStyleManager.getInstance(getProject()).reformatRange(file, myTextRange.getStartOffset(), myTextRange.getEndOffset()); } } catch (IncorrectOperationException e) { fail(); } }