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