@Override
  @Nullable
  public PsiJavaDocumentedElement getContainer(final PsiElement element) {
    PsiJavaDocumentedElement container = super.getContainer(element);
    if (container == null) {
      return null;
    }
    while (container != null) {
      final PsiClass parentClass = PsiTreeUtil.getParentOfType(container, PsiClass.class);
      if (parentClass == null && container instanceof PsiClass && !(container instanceof PsiImplicitClass)) {
        return container;
      }
      container = parentClass;
    }
    return null;
  }
@Override
  @Nullable
  public PsiJavaDocumentedElement getContainer(final PsiElement element)