boolean (@Nullable PsiExpression processor) { processor = PsiUtil.skipParenthesizedExprDown(processor); if (processor instanceof PsiReferenceExpression) { PsiElement target = ((PsiReferenceExpression)processor).resolve(); if (target instanceof PsiField) { PsiField field = (PsiField)target; if (field.getName().equals("STR")) { PsiClass containingClass = field.getContainingClass(); return containingClass != null && JAVA_LANG_STRING_TEMPLATE.equals(containingClass.getQualifiedName()); } } } return false; }