public static int compare(@Nullable @NonNls String ver1, @Nullable @NonNls String ver2, @NotNull TokenPrioritizer tokenPriorityProvider) {
    // todo duplicates com.intellij.openapi.util.text.StringUtil.compareVersionNumbers()
    // todo please refactor next time you make changes here
    if (ver1 == null) {
      return (ver2 == null) ? 0 : -1;
    } else if (ver2 == null) {
      return 1;
    }

    ver1 = ver1.toLowerCase(Locale.ENGLISH);
    ver2 = ver2.toLowerCase(Locale.ENGLISH);

    final List<String> s1 = splitVersionString(ver1);
    final List<String> s2 = splitVersionString(ver2);

    padWithNulls(s1, s2);

    int res;
    for (int i = 0; i < s1.size(); i++) {
      final String e1 = s1.get(i);
      final String e2 = s2.get(i);
      final VersionTokenType t1 = VersionTokenType.lookup(e1);

      res = Integer.compare(tokenPriorityProvider.getPriority(e1), tokenPriorityProvider.getPriority(e2));
      if (res != 0) {
        return res;
      } else if (t1 == VersionTokenType._WORD) {
        res = e1.compareTo(e2);
      } else if (t1 == VersionTokenType._DIGITS) {
        res = compareNumbers(e1, e2);
      }

      if (res != 0) {
        return res;
      }
    }

    return 0;
  }
public static int compare(@Nullable @NonNls String ver1, @Nullable @NonNls String ver2, @NotNull TokenPrioritizer tokenPriorityProvider)