private static PackageSet updateNameInPattern(@NotNull PackageSet packageSet, String oldName, @NotNull String newName) {
    if ((packageSet instanceof PatternBasedPackageSet) && ((PatternBasedPackageSet)packageSet).isOn(oldName)) {
      return ((PatternBasedPackageSet)packageSet).updatePattern(oldName, newName);
    }
    return packageSet;
  }
private static PackageSet updateNameInPattern(@NotNull PackageSet packageSet, String oldName, @NotNull String newName)