Changeing Baseline of Component.
2 answers
IBaselineHandle baseline = (IBaselineHandle) it.next();
IBaseline baseline_comp = (IBaseline)repo.itemManager().fetchCompleteItem(baseline, IItemManager.DEFAULT, MONITOR);
IBaselineConnection baseConnection = wm.getBaselineConnection(baseline_comp,MONITOR);
// Replace Baseline
clone_stream.replaceComponent(component,baseConnection,false,true,MONITOR);
IBaseline baseline_comp = (IBaseline)repo.itemManager().fetchCompleteItem(baseline, IItemManager.DEFAULT, MONITOR);
IBaselineConnection baseConnection = wm.getBaselineConnection(baseline_comp,MONITOR);
// Replace Baseline
clone_stream.replaceComponent(component,baseConnection,false,true,MONITOR);
See replaceComponent(IComponentHandle, IConnection, boolean, IProgressMonitor) on com.ibm.team.scm.client.IFlowNodeConnection.
IFlowNodeConnection is the supertype of IWorkspaceConnection, which represents a workspace or stream.
The 2nd arg, IConnection, should be an IBaselineConnection, which can be obtained via:
getBaselineConnection(IBaselineHandle, IProgressMonitor)
on IWorkspaceManager.
See also its findBaselines(IBaselineSearchCriteria, int, IProgressMonitor) method.
IFlowNodeConnection is the supertype of IWorkspaceConnection, which represents a workspace or stream.
The 2nd arg, IConnection, should be an IBaselineConnection, which can be obtained via:
getBaselineConnection(IBaselineHandle, IProgressMonitor)
on IWorkspaceManager.
See also its findBaselines(IBaselineSearchCriteria, int, IProgressMonitor) method.