boolean (@NotNull UCallExpression expression) { if (expression.getKind() != UastCallKind.METHOD_CALL) return false; if (!NAMED_COLOR_METHOD_NAME.equals(expression.getMethodName())) return false; PsiMethod resolved = expression.resolve(); if (resolved == null) return false; PsiClass containingClass = resolved.getContainingClass(); return containingClass != null && JB_COLOR_FQN.equals(containingClass.getQualifiedName()); }