* @return
*/
public static RepositorySession getRepositorySession(IProject project){
RepositorySession repos = null;
try {
repos = (RepositorySession)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.REPOS_SESSION_OBJECT));
if (repos == null){
/*
* create a RepositorySession based on the project properties
* and store it as a session property
*/
String repository = project.getPersistentProperty(ToolProjectSupport.reposQualifiedName);
String workspace = project.getPersistentProperty(ToolProjectSupport.workspaceQualifiedName);
String workspacePassword = project.getPersistentProperty(ToolProjectSupport.worspacePasswordQualifiedName);
File reposDir = ToolProjectSupport.getInterfaceDir();
IPath interfacePath = new Path(reposDir.getAbsolutePath());
repos = new RepositorySession(repository, workspace, workspacePassword, interfacePath, project);
project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.REPOS_SESSION_OBJECT), repos);
}
} catch (CoreException e) {
ToolPlugin.showError("Cannot connect to Repository session", e);
} catch (CouldNotConnectException e) {