It's all about the answers!

Ask a question

how to get the author/creator of a certain IResource?


Jingwen Ou (5610) | asked Jul 30 '08, 1:08 a.m.
Hi,

How to get the author/creator of a certain IResource in Jazz? For example, when clicking an element in the package explorer, it displays its corresponding last author/creator.

One answer



permanent link
Dmitry Karasik (1.8k11) | answered Jul 30 '08, 4:06 a.m.
JAZZ DEVELOPER
How to get the author/creator of a certain IResource in Jazz? For
example, when clicking an element in the package explorer, it displays
its corresponding last author/creator.

Try:


IShareable shareable = (IShareable)resource.getAdapter(IShareable.class);
ISharingDescriptor desc = shareable.getShare().getSharingDescriptor();
ITeamRepository repo = RepositoryUtils.getTeamRepository
(desc.getRepositoryUri(), desc.getRepositoryId());

return SCMPlatform.getWorkspaceManager(repo).versionableManager
().fetchCompleteState(shareable.getRemote(), monitor).getModifiedBy();

- Dmitry

Your answer


Register or to post your answer.