It's all about the answers!

Ask a question

How Can i fetch Basline Name from the Change set

Saritha Yadav (134) | asked Jul 31 '15, 6:26 a.m.
edited Jul 31 '15, 6:29 a.m. by Ralph Schoon (62.9k33645)
Currently im developing a server side plugin and i can fetch the Changesets and Component Handle.

 IComponentHandle cHandle = changeSet.getComponent();
      IComponent component=
          (IComponent) repositoryItemService.fetchItem(componentHandle, IRepositoryItemService.COMPLETE);

but how can i fetch the Baseline Name? I have tried by using IBaselineHandle but im getting an exception

 IBaselineHandle baselineHandle = (IBaselineHandle) link.getSourceRef().resolve();

Accepted answer

permanent link
Ralph Schoon (62.9k33645) | answered Jul 31 '15, 6:41 a.m.
edited Jul 31 '15, 6:42 a.m.
IBaselineConnection.setName(name, monitor)
IBaselineConnection.getName(name, monitor)

To get the IBaselineConnection from the handle use IWorkspaceManager.getBaselineConnection().
Saritha Yadav selected this answer as the correct answer

One other answer

permanent link
Saritha Yadav (134) | answered Jul 31 '15, 6:57 a.m.
Thanks Ralph

Your answer

Register or to post your answer.