void (@NotNull GrWhileStatement statement) { if (myType2 == GroovyTokenTypes.mLPAREN) { createSpaceInCode(mySettings.SPACE_BEFORE_WHILE_PARENTHESES); } else if (isWithinParentheses()) { createSpaceInCode(mySettings.SPACE_WITHIN_WHILE_PARENTHESES); } else if (myChild2.getPsi() instanceof GrBlockStatement) { createSpaceBeforeLBrace(mySettings.SPACE_BEFORE_WHILE_LBRACE, mySettings.BRACE_STYLE, new TextRange(myParent.getTextRange().getStartOffset(), myChild1.getTextRange().getEndOffset()), mySettings.KEEP_SIMPLE_BLOCKS_IN_ONE_LINE); } else { createSpacingBeforeElementInsideControlStatement(); } }