How can i get the "my repository workspace" programmatically with plain java API
I am able to find the project area,stream and component with the help of IWorkspaceManager but not able to find the my repository workspace.
I have to do few operation with the following parameters
I have to do few operation with the following parameters
ITeamRepository repo, IWorkspaceHandle workspace, IComponentHandle component, String sandboxLocation_CanBeNullIfRunningFromWithinEclipseRTC
In all these parameter i am not able to find IWorkspaceHandle workspace programmatically.
Please provide solution ASAP.
Thanks!!
One answer
You will need to search for your workspace.
IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repository)
IWorkspaceSearchCriteria criteria = IWorkspaceSearchCriteria.FACTORY.newInstance();
criteria.setExactName(rtcWorkspace); // or use another criteria
criteria.setKind(IWorkspaceSearchCriteria.WORKSPACES);
List<IWorkspaceHandle> workspaces = wm.findWorkspaces(criteria, maxSize, minitor);
IWorkspaceConnection connection = wm.getWorkspaceConnection(workspaces.get(0), monitor);