سؤال

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,

هل كانت مفيدة؟

المحلول

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()
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top