It's all about the answers!

Ask a question

Get Workspace of Component

Yung-Hsiang Chan (34913) | asked Nov 20 '14, 1:11 a.m.
Hi, I want to ask how to get the workspace of a given component?

Do I need to use IWorkspaceSearchCriteria to query it? Or is there any simpler API I can use?


Accepted answer

permanent link
Atul Kumar (1872129) | answered Nov 20 '14, 7:27 a.m.
See, if this helps:

criteria = IWorkspaceSearchCriteria.FACTORY.newInstance(); criteria.setKind(IWorkspaceSearchCriteria.STREAMS); IWorkspaceManager manager = SCMPlatform.getWorkspaceManager(repository); List< IWorkspaceHandle > workspaces = manager.findWorkspacesContainingComponent(component, criteria, Integer.MAX_VALUE);
Yung-Hsiang Chan selected this answer as the correct answer

One other answer

permanent link
Atul Kumar (1872129) | answered Nov 20 '14, 7:29 a.m.
You may refer to these articles for reference:


Your answer

Register or to post your answer.