UsageGroup (@NotNull Usage usage, UsageTarget @NotNull [] targets) { if (usage instanceof UsageInfo2UsageAdapter u) { final UsageInfo usageInfo = u.getUsageInfo(); if (usageInfo instanceof MoveRenameUsageInfo info) { return buildGroup(info.getReferencedElement(), usageInfo, true); } else { for (UsageTarget target : targets) { UsageGroup group = target instanceof PsiElementUsageTarget ? buildGroup(((PsiElementUsageTarget)target).getElement(), usageInfo, false) : null; if (group != null) return group; } } } return null; }