RefactoringStatus status = null;
if (getArguments().getUpdateReferences())
{
try
{
ISigilProjectModel sourceProject = SigilCore.create(compilationUnit.getJavaProject().getProject());
RefactorUtil.touch(ctx, sourceProject);
IPackageFragment packageFragment = (IPackageFragment) compilationUnit.getAncestor(IJavaModel.PACKAGE_FRAGMENT);
final String packageName = packageFragment.getElementName();
IPackageExport oldExport = ModelHelper.findExport(sourceProject,
packageName);
if (oldExport != null) {
status = RefactoringStatus.createWarningStatus("Moving a class from an exported package effects client bundles");
IPackageFragment dest = (IPackageFragment) getArguments().getDestination();
ISigilProjectModel destProject = SigilCore.create(dest.getJavaProject().getProject());
if (!destProject.equals(sourceProject)) {
status.addWarning("Moving an exported class to another bundle effects client bundles that use Require-Bundle");
}
IPackageExport newExport = ModelHelper.findExport(destProject,
dest.getElementName());