boolean (@NotNull ChangeIndentContext context) { if (context.targetLine == 0 || !containsNonWhiteSpaceData(context.document, 0, context.targetLine)) { changeIndent(context, 0); return false; } int newIndent = -1; for (int line = 0; line < context.targetLine; line++) { if (DocumentUtil.isLineEmpty(context.document, line)) { continue; } int indent = getLineIndent(context, line); if (isLineStartsWithCompoundStatement(context, line)) { newIndent = indent; break; } else if (newIndent < 0) { newIndent = indent; } } if (newIndent < 0) { return false; } changeIndent(context, newIndent); return true; }