private static boolean canImplementOverride(MethodHierarchyNodeDescriptor descriptor, MethodHierarchyBrowser methodHierarchyBrowser, boolean toImplement) {
    PsiElement psiElement = descriptor.getPsiClass();
    if (!(psiElement instanceof PsiClass psiClass)) return false;
    if (psiClass instanceof PsiSyntheticClass) return false;
    PsiMethod baseMethod = methodHierarchyBrowser.getBaseMethod();
    if (baseMethod == null) return false;
    MethodSignature signature = baseMethod.getSignature(PsiSubstitutor.EMPTY);

    Collection<MethodSignature> allOriginalSignatures = toImplement
                                                        ? OverrideImplementExploreUtil.getMethodSignaturesToImplement(psiClass)
                                                        : OverrideImplementExploreUtil.getMethodSignaturesToOverride(psiClass);
    return allOriginalSignatures.contains(signature);
  }
private static boolean canImplementOverride(MethodHierarchyNodeDescriptor descriptor, MethodHierarchyBrowser methodHierarchyBrowser, boolean toImplement)