static @Nullable PsiElement getDataflowContext(@NotNull PsiElement anchor) {
    PsiElement element = anchor;
    while (true) {
      if (element == null || element instanceof PsiAnnotation) return null;
      if (element instanceof PsiMethod method && !method.isConstructor()) {
        PsiClass containingClass = method.getContainingClass();
        if (containingClass != null &&
            (!PsiUtil.isLocalOrAnonymousClass(containingClass) || containingClass instanceof PsiEnumConstantInitializer)) {
          return method.getBody();
        }
      }
      if (element instanceof PsiClass psiClass && !PsiUtil.isLocalOrAnonymousClass(psiClass)) return psiClass;
      element = element.getParent();
    }
  }
static @Nullable PsiElement getDataflowContext(@NotNull PsiElement anchor)