It's all about the answers!

Ask a question

Getting Baselines from a component.


K M (38325251) | asked Apr 20 '10, 3:39 p.m.
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



permanent link
K M (38325251) | answered Apr 21 '10, 7:59 a.m.
Found it

IWorkspaceManager wm = SCMPlatform.getWorkspaceManager(repo);
List baselines = wm.findAllBaselines(component,"",MONITOR);

permanent link
K M (38325251) | answered Apr 21 '10, 9:04 a.m.
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


Register or to post 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.