MoveResourcesProcessor processor = new MoveResourcesProcessor(resources);
processor.setDestination(target);
ProcessorBasedRefactoring refactoring = new ProcessorBasedRefactoring(
processor);
CheckConditionsOperation checkOp = new CheckConditionsOperation(
refactoring, CheckConditionsOperation.ALL_CONDITIONS);
CreateChangeOperation operation = new CreateChangeOperation(checkOp,
RefactoringStatus.WARNING);
PerformChangeOperation perform = new PerformChangeOperation(operation);
try {
ResourcesPlugin.getWorkspace().run(perform,
new NullProgressMonitor());
} catch (CoreException e) {
PHPCorePlugin.log(e.getStatus());
return false;
}
RefactoringStatus status = perform.getValidationStatus();
if (status == null) {
RefactoringStatus refactoringStatus = checkOp.getStatus();
if (refactoringStatus != null && !refactoringStatus.isOK()) {
MessageDialog
.openError(fShell, Messages.ReorgMoveAction_0,
Messages.ReorgMoveAction_1);