String (PsiExpression expression) { if (!(expression instanceof PsiReferenceExpression referenceExpression)) { return null; } final PsiElement target = referenceExpression.resolve(); if (!(target instanceof PsiField field)) { return null; } final PsiClass containingClass = field.getContainingClass(); if (containingClass == null) { return null; } final String qualifiedName = containingClass.getQualifiedName(); if (!CommonClassNames.JAVA_LANG_BOOLEAN.equals(qualifiedName)) { return null; } @NonNls final String name = field.getName(); if ("TRUE".equals(name)) { return "true"; } else if ("FALSE".equals(name)) { return "false"; } else { return null; } }