2013-02-25 38 views
0

我有一個與變更集關聯的組件。從變更集中獲取組件名稱

現在我需要從

我已成功地獲取IComponentHandle對象的變更不.getItemId()獲取組件的名稱。 我一直在尋找一種方法從IComponentHandle獲取組件名稱。 ...你能幫我解決這個問題嗎!

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

由於提前,

回答

2

如果您有:

IProgressMonitor monitor; 
ITeamRepository repository; 

您可以使用:

IComponentHandle componentHandle= changeSet.getComponent(); 

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

要獲取組件和使用:

component.getName()