Get IFileItems from plain java source file
Hello. How can I get a IFileItem object for a certain source file from my repository? I'm looking for the solution into the api but I can't find out how to do that using the Java Plain Client Libraries. Thanks
|
One answer
From your other other question, if you have the IShareable for the file, then <tt>IShareable.getVersionable(monitor)</tt> gives you an IVersionableHandle which can be passed to
<tt>IItemManager#fetchCompleteItem(IItemHandle, int, IProgressMonitor)</tt> to get the full IFileItem. You can get an ITeamRepository using <tt>RepositoryUtils.getTeamRepository(sharingDescriptor)</tt>, and then <tt>ITeamRepository.itemManager()</tt> give you the item manager. Comments
ioana lazar
commented Jul 25 '12, 3:07 p.m.
Hey. I can't get the IShareable object. I get a null reference for it. |
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.