簡體   English   中英

從Changeset獲取組件名稱

[英]Get the Component name from Changeset

我有一個與變更集關聯的組件。

現在我需要從變更集中獲取組件名稱而不是.getItemId()

我設法獲取IComponentHandle對象。 我一直在尋找從IComponentHandle獲取組件名稱的方法。 你能幫助我嗎?

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

提前致謝,

如果你有:

IProgressMonitor monitor;
ITeamRepository repository;

您可以使用:

IComponentHandle componentHandle= changeSet.getComponent();

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

獲取組件並使用:

component.getName()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM