@Override
  public PsiElement getParent(final PsiElement psiElement) {
    if (psiElement instanceof PsiPackage psiPackage) {
      final PsiPackage parentPackage = psiPackage.getParentPackage();
      if (parentPackage != null && !parentPackage.getQualifiedName().isEmpty()) {
        return parentPackage;
      }
    }
    return super.getParent(psiElement);
  }
@Override
  public PsiElement getParent(final PsiElement psiElement)