I'm looking for a way to extend the RTC client to get the current work item programmatically, or even better add a listener that notifies me whenever the current work item is changed.
I don't know where to start. Any hints?
I'm looking for a way to extend the RTC client to get the current work item programmatically, or even better add a listener that notifies me whenever the current work item is changed.
I don't know where to start. Any hints?
可以使用以下代码获取IWorkItemActivationManager
:
IWorkItemActivationManager manager = ClientModel.getWorkItemActivationManager();
这位经理,可以使用该方法getActiveWorkItem
获得IWorkItemHandle
:
IWorkItemHandle handle = manager.getActiveWorkItem();
然后可以使用以下代码获取IWorkItem
:
IAuditableClient auditableClient= (IAuditableClient) Controller.getInstance().getTeamRepository().getClientLibrary(IAuditableClient.class);
IWorkItem item = auditableClient.resolveAuditable(handle, com.ibm.team.workitem.common.model.IWorkItem.FULL_PROFILE, null);
在ClientModel
以下包中:com.ibm.team.workitem.rcp.core
我通常探索的一种方法是通过 REST 调用的 OSLC API。
激活 Chrome 及其“开发者工具”后,我单击 Web 客户端并查看完成的请求。
这表明所涉及的服务类型。
然后您可以查看“如何使用 Rational Team Concert 变更管理服务”,它说明了这些服务的结构。
将它与“ Extending Rational Team Concert 3.x ”结合起来,您就可以从那里开始了。