void (PsiFile file, Document document, int startOffset, int endOffset, int line, Project project) { CodeStyleManager codeStyleManager = CodeStyleManager.getInstance(project); if (startOffset == endOffset) { int lineStart = document.getLineStartOffset(line); if (codeStyleManager.isLineToBeIndented(file, lineStart)) { codeStyleManager.adjustLineIndent(file, lineStart); } } else { codeStyleManager.adjustLineIndent(file, new TextRange(DocumentUtil.getLineStartOffset(startOffset, document), endOffset)); } }