// TODO Replace Core messages.
final String header= Messages.format("Renaming WO Component {0} to {1}", new String[] { _resource.getFullPath().toString(), getNewResourceName()});
final String description= Messages.format("Renaming WO Component {0}", _resource.getName());
final String comment= new JDTRefactoringDescriptorComment(project, this, header).asString();
final int flags= RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE | RefactoringDescriptor.BREAKING_CHANGE;
final RenameResourceDescriptor descriptor= new RenameResourceDescriptor();
descriptor.setProject(project);
descriptor.setDescription(description);
descriptor.setComment(comment);
descriptor.setFlags(flags);
descriptor.setResourcePath(_resource.getLocation());
descriptor.setNewName(getNewResourceName() + ".wo");
return new DynamicValidationStateChange(new RenameWOComponentChange(descriptor, _resource, getNewResourceName() + ".wo", comment));
} finally {
pm.done();
}
}