try {
String newName = params.getNewProjectName();
assert newName != null;
File newLocation = new File(unpackFolder, newName);
ManagedProject mp = unpackedProject.getExtensionObject(ManagedProject.class);
ProjectFile oldProjectFile = mp.getProjectFile();
oldProjectFile.setNewName(newName);
FileUtils.copyDirectory(oldProjectFile.getParentFolder(), newLocation);
locationOfUnpackedProject = newLocation;
return newName;
} catch (IOException e) {
throw new JitterPackException("Could not rename the unpacked project: " + e.getMessage(), e);
}