boolean (@NotNull PsiElement elementToHighlight) { PsiReferenceExpression referenceExpression = PsiTreeUtil.getParentOfType(elementToHighlight, PsiReferenceExpression.class); if (referenceExpression != null) { JavaResolveResult result = referenceExpression.advancedResolve(false); return result.getCurrentFileResolveScope() instanceof PsiImportStaticStatement; } return false; }