Spacing (@NotNull PsiMethod method) { int space = mySettings.SPACE_BEFORE_METHOD_LBRACE ? 1 : 0; int methodBraceStyle = mySettings.METHOD_BRACE_STYLE; if (methodBraceStyle == END_OF_LINE) { return createNonLFSpace(space, null); } else if (methodBraceStyle == NEXT_LINE_IF_WRAPPED) { TextRange headerRange = new TextRange(getMethodHeaderStartOffset(method), getMethodHeaderEndOffset(method)); return createNonLFSpace(space, headerRange); } else if (shouldHandleAsSimpleMethod(method)) { TextRange rangeWithoutAnnotations = new TextRange(getMethodHeaderStartOffset(method), method.getTextRange().getEndOffset()); return createNonLFSpace(space, rangeWithoutAnnotations); } return Spacing.createSpacing(space, space, 1, false, mySettings.KEEP_BLANK_LINES_IN_CODE); }