@Nullable
    @Override
    EnumContext getContext(@NotNull PsiElement origin) {
      PsiClass aClass = PsiTreeUtil.getParentOfType(origin, PsiClass.class);
      if (aClass == null) return null;
      if (!aClass.isEnum()) return null;
      PsiEnumConstant[] constants = PsiTreeUtil.getChildrenOfType(aClass, PsiEnumConstant.class);
      if (constants == null || constants.length < MIN_ELEMENTS_COUNT) return null;
      PsiEnumConstant last = constants[constants.length - 1];
      PsiElement lastEnumRelatedElement = getLastEnumDeclarationRelatedElement(last);
      if (lastEnumRelatedElement.getTextRange().getEndOffset() <= origin.getTextOffset()) return null;
      PsiElement lBrace = aClass.getLBrace();
      if (lBrace == null) return null;
      PsiElement nextAfterLbrace = lBrace.getNextSibling();
      if (nextAfterLbrace == null) return null;
      return new EnumContext(Arrays.asList(constants), nextAfterLbrace);
    }
@Nullable
    @Override
    EnumContext getContext(@NotNull PsiElement origin)