How to retrieve the project area of a java file?
![]()
Hi all!
I have implemented it with Jazz 1.x version. But in 2.0 version some of the interfaces have been changed, my former code doesn't work now. Here is my former code.
In RTC 2.0, there is no getOwner() method. So, my plugin couldn't find out the project area of a java file. Could anyone tell me how to modify the code to get the project area in RTC 2.0. |
11 answers
![]()
Ok, we got it:
IScmService scmService = (IScmService) ((IClientLibraryContext) repo).getServiceInterface(IScmService.class); IComponentHandle componentH = cs.getComponent(); ComponentOwnerHandle componentOwnerH = scmService.getComponentOwnerRecord((ComponentHandle) componentH); ComponentOwner componentOwner = (ComponentOwner) repo.itemManager().fetchCompleteItem(componentOwnerH, IItemManager.DEFAULT, null);
Cheers.
|