if (getArguments().getUpdateReferences())
{
try
{
ISigilProjectModel sigil = SigilCore.create(packageFragment.getJavaProject().getProject());
final String packageName = packageFragment.getElementName();
SigilCore.log("Rename checkConditions " + packageName);
IPackageExport oldExport = ModelHelper.findExport(sigil, packageName);
if (oldExport != null)
{
// record change to check if out of sync...
RefactorUtil.touch(context, sigil);
status = RefactoringStatus.createWarningStatus("Package "
+ packageName
+ " is exported. Renaming this package may effect bundles outside of this workspace");
SigilCore.log("Export Package " + packageName + " renamed to "
+ getArguments().getNewName());
IPackageExport newExport = ModelElementFactory.getInstance().newModelElement(
IPackageExport.class);
newExport.setPackageName(getArguments().getNewName());
newExport.setVersion(oldExport.getVersion());
changes.add(new ExportPackageChange(sigil, oldExport, newExport));
for (ISigilProjectModel other : SigilCore.getRoot().getProjects())
{
if (!sigil.equals(other))
{
// record change to check if out of sync...
RefactorUtil.touch(context, other);
}
changes.add(createImportChange(status, other, oldExport,