Getting Baselines from a component.
I have IComponentHandle and IComponent class for a component.
I can get the initial baseline using IComponent getInitialBaseline(). How do I retrieve the rest of the baselines? If the compenents are in streams I have no problem I use: List stream = wm.findWorkspaces(crit, 1, MONITOR); Iterator it = stream.iterator(); IWorkspaceHandle element = (IWorkspaceHandle) it.next(); IWorkspaceConnection wc = wm.getWorkspaceConnection(element, null); wc.getBaselinesInHistory() |
2 answers
Found it
IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repo); List baselines = wm.findAllBaselines(component,"",MONITOR); |
wm.findAllBaselines is deprecated
Using: IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repo); IBaselineSearchCriteria crit1 = IBaselineSearchCriteria.FACTORY.newInstance(); crit1.setComponentRequired(component); List baselines = wm.findBaseline(crit1, Integer.MAX_VALUE,MONITOR); |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.