1

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,

Echo
  • 2,959
  • 15
  • 52
  • 65

1 Answers1

3

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()
BobTheBuilder
  • 18,858
  • 6
  • 40
  • 61