private static boolean isInStaticInitializer(PsiElement element) {
      final PsiClassInitializer initializer = PsiTreeUtil.getParentOfType(element, PsiClassInitializer.class);
      return initializer != null && initializer.hasModifierProperty(PsiModifier.STATIC);
    }
private static boolean isInStaticInitializer(PsiElement element)