private static boolean isInStaticMember(PsiElement element) {
      final PsiMember member =
        PsiTreeUtil.getParentOfType(element,
                                    PsiMethod.class, PsiClassInitializer.class, PsiField.class);
      if (member == null) {
        return false;
      }
      return member.hasModifierProperty(PsiModifier.STATIC);
    }
private static boolean isInStaticMember(PsiElement element)