How to read project name in AttributePart
Hi,
I am extending com.ibm.team.workitem.ide.ui.internal.editor.presentations.AttributePart I have IProjectAreaHandle but I cannot get IProjectArea Can you please help me getting IProjectArea from IProjectAreaHandle? I would like to read project Area name. Thanks, |
4 answers
If your code is in server side, you can use:
IRepositoryItemService.fetchItem() to get the project area. If your code is in eclipse client side, you can use IItemManager.fetchCompleteItems() to get the project area. You can use ITeamRepository.itemManager() to get the item manager instance. |
If your code is in server side, you can use: Hi, Thanks for the answer but I still cannot fill the gaps. I am rephrasing my question: I am in client side and extending presentation pf a workitem attribute (com.ibm.team.workitem.ide.ui.internal.editor.presentations.AttributePart ) What I need is to read the name of project area. I am able to get IProjectAreaHandle. I am asking an example of reading project area name from IProjectAreaHandle. Below is my method that gets IProjectAreaHandle: private String getProjectAreaName() { |
Hi,
Whenever you have a handle, you will have to resolve it to the real thing before you can get its attributes. This was explained two weeks ago. So in your case resolve the IProjectAreaHandle to a IProjectArea and then use the getName() method. --andre Andre Weinand Work Item Team |
Hi Andre thanks for your effort but my question was how to resolve IProjectAreaHandle to a IProjectArea.
Here is the answer we found by digging the API: fWorkingCopy is WorkItemEditorInput's working copy. private String getComponentName() { |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.