public boolean createProject(Project project) {
RemoteProject remoteProject = null;
if (project instanceof RemoteProject)
remoteProject = (RemoteProject) project;
DataHandler dataHandler = DataHandlerFactory.getDataHandler(project);
// String projectDirectory = workspaceDir;
// projectDirectory += projectName;
try {
dataHandler.initialize();
if (project.getLocation() == ProjectLocation.SSH) {
remoteProject.setDataHandler(dataHandler);
remoteProject.setOpenConnection(true);
remoteProjects.add(remoteProject);
frame.addRemoteProjectRunMenu(remoteProject);
} else {
localProjects.add(project);
frame.addLocalProjectRunMenu(project);
}
return dataHandler.createDirectory(project.getName(), false);
} catch (IOException e) {
String message = e.getMessage();
if (e.getCause() != null) {
message += "\n Caused by: " + e.getCause().getMessage();
}