private static double getPriority(@NotNull PsiReference o1) {
    if (o1 instanceof PriorityReference) return ((PriorityReference)o1).getPriority();
    return PsiReferenceRegistrar.DEFAULT_PRIORITY;
  }
private static double getPriority(@NotNull PsiReference o1)