boolean (PsiElement element, boolean canBeAfterBrace) { PsiElement previousLeaf = getLeafByOffset(element.getTextRange().getStartOffset() - 1, element); previousLeaf = PsiImplUtil.realPrevious(previousLeaf); if (previousLeaf != null) { if (canBeAfterBrace && GroovyTokenTypes.mLCURLY.equals(previousLeaf.getNode().getElementType())) { return true; } if (GroovyTokenTypes.mCOLON.equals(previousLeaf.getNode().getElementType()) && previousLeaf.getParent() instanceof GrLabeledStatement) { return true; } } return (previousLeaf == null || SEPARATORS.contains(previousLeaf.getNode().getElementType())); }