if (existing != null) {
return existing;
}
String id = WebProject.nextProjectId();
WebProject project = WebProject.fromId(id);
project.setName(name);
try {
DummyRequest req = new DummyRequest(userName);
WorkspaceResourceHandler.computeProjectLocation(req, project, null, true);
} catch (URISyntaxException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (CoreException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
//If all went well, add project to workspace
WorkspaceResourceHandler.addProject(userName, webWorkspace, project);
} catch (CoreException e) {
e.printStackTrace();
}
try {
return new VOrionProjectStorage(name, project.getProjectStore(),project,this);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}