void (@NotNull PsiAnnotationParameterList list) { if (myRole1 == ChildRole.LPARENTH && myRole2 == ChildRole.RPARENTH) { createSpaceInCode(false); } // There is a possible case that annotation key-value pair is used in 'shorten' form (with implicit name 'values'). It's also // possible that target value is surrounded by curly braces. We want to define child role accordingly then. else if (myRole1 == ChildRole.LPARENTH && mySettings.SPACE_BEFORE_ANNOTATION_ARRAY_INITIALIZER_LBRACE && myRole2 == ChildRole.ANNOTATION_VALUE) { createSpaceInCode(true); } else if (myRole1 == ChildRole.LPARENTH && myType2 == JavaElementType.NAME_VALUE_PAIR && myJavaSettings.NEW_LINE_AFTER_LPAREN_IN_ANNOTATION) { int spacesCount = mySettings.SPACE_BEFORE_ANNOTATION_ARRAY_INITIALIZER_LBRACE ? 1 : 0; myResult = Spacing.createDependentLFSpacing(spacesCount, spacesCount, myParent.getTextRange(), mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE); } else if (myType1 == JavaElementType.NAME_VALUE_PAIR && myRole2 == ChildRole.RPARENTH && myJavaSettings.RPAREN_ON_NEW_LINE_IN_ANNOTATION) { myResult = Spacing.createDependentLFSpacing(0, 0, myParent.getTextRange(), mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE); } else if (myRole1 == ChildRole.LPARENTH || myRole2 == ChildRole.RPARENTH) { createSpaceInCode(mySettings.SPACE_WITHIN_ANNOTATION_PARENTHESES); } else if (myRole2 == ChildRole.COMMA) { createSpaceInCode(false); } else if (myRole1 == ChildRole.COMMA) { createSpaceInCode(true); } }