void (PsiMethod method) { final RefManagerImpl refManager = getRefManager(); if (refManager.isOfflineView()) return; for (PsiMethod psiSuperMethod : method.findSuperMethods()) { if (refManager.belongsToScope(psiSuperMethod)) { PsiElement sourceElement = RefJavaUtilImpl.returnToPhysical(psiSuperMethod); RefElement refElement = refManager.getReference(sourceElement); if (refElement instanceof RefMethodImpl refSuperMethod) { addSuperMethod(refSuperMethod); refManager.executeTask(() -> refSuperMethod.markExtended(this)); } else { setLibraryOverride(true); } } else { setLibraryOverride(true); } } }