Question

I have a Component associated to changeset.

Now I need to get the Component name from the changeset not the .getItemId()

I have managed to fetch the IComponentHandle object. I have been searching for a way to get the Component name from IComponentHandle. ... Can you help me into that !

  IComponentHandle component = changeSet.getComponent();
  IConfiguration configuration = workspaceConnection.configuration(component);

Thanks in advance,

Was it helpful?

Solution

If you have:

IProgressMonitor monitor;
ITeamRepository repository;

You can use:

IComponentHandle componentHandle= changeSet.getComponent();

IComponent component = (IComponent) repository.itemManager().fetchCompleteItem(componentHandle, IItemManager.DEFAULT, monitor);

To get the component and use:

component.getName()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top