void (PsiReferenceList originalReferenceList, PsiReferenceList queryReferenceList, PsiReferenceList replacementReferenceList) { if (originalReferenceList == null || queryReferenceList == null || replacementReferenceList == null) { return; } if (originalReferenceList.getReferenceElements().length != 0 && queryReferenceList.getReferenceElements().length == 0 && replacementReferenceList.getReferenceElements().length == 0) { replacementReferenceList.replace(originalReferenceList); } }