void (@NotNull PsiJavaCodeReferenceElement reference) { if (reference.isValid() && reference.isReferenceTo(oldClass)) { final PsiImportStatementBase importStatement = PsiTreeUtil.getParentOfType(reference, PsiImportStatementBase.class); if (importStatement != null) { importsToDelete.add(importStatement); return; } try { reference.bindToElement(newClass); } catch (IncorrectOperationException e) { LOG.error(e); } } super.visitReferenceElement(reference); }