PsiImportStaticStatement (PsiJavaCodeReferenceElement referenceElement) { PsiElement parent = referenceElement.getParent(); return parent instanceof PsiImportStaticStatement importStatic ? importStatic : ObjectUtils.tryCast(referenceElement.advancedResolve(true).getCurrentFileResolveScope(), PsiImportStaticStatement.class); }