boolean (PsiElement element) { if (isApplicableLiteral(element)) { return true; } if (!(element instanceof GrBinaryExpression binaryExpression)) return false; if (!GroovyTokenTypes.mPLUS.equals(binaryExpression.getOperationTokenType())) return false; if (ErrorUtil.containsError(element)) return false; final PsiType type = binaryExpression.getType(); if (type == null) return false; final PsiClassType stringType = TypesUtil.createType(CommonClassNames.JAVA_LANG_STRING, element); final PsiClassType gstringType = TypesUtil.createType(GroovyCommonClassNames.GROOVY_LANG_GSTRING, element); if (!(TypeConversionUtil.isAssignable(stringType, type) || TypeConversionUtil.isAssignable(gstringType, type))) return false; return true; }