@Override
  public boolean isPairedBracesAllowedBeforeType(@NotNull IElementType braceType, @Nullable IElementType tokenType) {
    return tokenType == null
           || tokenType == TokenType.WHITE_SPACE
           || tokenType == NL
           || tokenType == GroovyTokenTypes.mSEMI
           || tokenType == GroovyTokenTypes.mCOMMA
           || tokenType == GroovyTokenTypes.mRPAREN
           || tokenType == GroovyTokenTypes.mRBRACK
           || tokenType == GroovyTokenTypes.mRCURLY
           || TokenSets.COMMENT_SET.contains(tokenType)
           || tokenType.getLanguage() != GroovyLanguage.INSTANCE;
  }
@Override
  public boolean isPairedBracesAllowedBeforeType(@NotNull IElementType braceType, @Nullable IElementType tokenType)