Spacing (@NotNull PsiClass aClass) { int space = mySettings.SPACE_BEFORE_CLASS_LBRACE ? 1 : 0; int classBraceStyle = mySettings.CLASS_BRACE_STYLE; if (classBraceStyle == END_OF_LINE || shouldHandleAsSimpleClass(aClass)) { return createNonLFSpace(space, null); } else if (classBraceStyle == NEXT_LINE_IF_WRAPPED) { PsiIdentifier nameIdentifier = aClass.getNameIdentifier(); int startOffset = nameIdentifier == null ? myParent.getTextRange().getStartOffset() : nameIdentifier.getTextRange().getStartOffset(); TextRange range = new TextRange(startOffset, myChild1.getTextRange().getEndOffset()); return createNonLFSpace(space, range); } return Spacing.createSpacing(space, space, 1, false, mySettings.KEEP_BLANK_LINES_IN_CODE); }