It's all about the answers!

Ask a question

Show baseline and changeset with API Client


rougier philippe (113) | asked Jul 15 '15, 11:26 a.m.
edited Jul 15 '15, 11:44 a.m.
 Hi,

 I try to develop with the API client RTC a tool to have all changeset and baselines from one Stream (i have one component with two stream).


workspaceManager.findBaselines(criteres, Integer.MAX_VALUE, monitor); => return all baselines of two stream


IHistoricBaselineIterator it = workspaceConnection.getMergedBaselineHistory(composant, Integer.MAX_VALUE, monitor); 
=> return only a part of my baselines with two occurs of each baseline.

What 's simple solution to retrieve all baselines of one stream ?

Thanks.

Philippe





One answer



permanent link
rougier philippe (113) | answered Jul 17 '15, 7:52 a.m.
 Hi,

 Finally, i found this :

IHistoricBaselineIterator ith = workspaceConnection.getBaselinesInHistory(composant, 50, monitor);
List<IBaselineHandle> baselines = new ArrayList<IBaselineHandle>();
baselines.addAll(ith.getBaselines());
 while (ith.hasPrevious()) {
 ith = ith.getPrevious(50, monitor); 
 baselines.addAll(ith.getBaselines());
}

I don't know, if exist best solution ?

Your answer


Register or to post your answer.