void (UsageInfo root, UsageInfo migration, final TypeMigrationLabeler labeler) { final PsiElement rootElement = root.getElement(); if (rootElement == null) return; final Set<PsiElement> usages = labeler.getTypeUsages((TypeMigrationUsageInfo)migration, ((TypeMigrationUsageInfo)root)); if (usages != null) { final List<UsageInfo> infos = new ArrayList<>(usages.size()); for (PsiElement usage : usages) { if (usage != null && usage.isValid()) { infos.add(new UsageInfo(usage)); } } showUsages(new PsiElement[]{rootElement}, infos.toArray(UsageInfo.EMPTY_ARRAY)); } else { showUsages(new PsiElement[]{rootElement}, new UsageInfo[] {migration}); } }