void (PsiElement element) { if (element instanceof PsiReferenceExpression) { PsiExpression qualifierExpression = ((PsiReferenceExpression)element).getQualifierExpression(); if (qualifierExpression instanceof PsiReferenceExpression && ((PsiReferenceExpression)qualifierExpression).resolve() == mySourceClass) { ((PsiReferenceExpression)qualifierExpression).bindToElement(myTargetSuperClass); } else if (qualifierExpression == null && myTargetSuperClass.isInterface()) { ((PsiReferenceExpression)element).setQualifierExpression(JavaPsiFacade.getElementFactory(myProject).createReferenceExpression(myTargetSuperClass)); } } }