final DirectoryResource newRoot = projectFactory.findProjectRootRecusively(currentDirectory);
if (newRoot != null)
{
Project oldProject = cp.getCurrent();
Project temp = new BaseProject()
{
@Override
public DirectoryResource getProjectRoot()
{
return newRoot;