It's all about the answers!

Ask a question

Project not showing in eclipse after API load


Adam Coulthard (1322116) | asked May 31 '13, 10:37 a.m.
 Hi,

Using the API I've managed to get the my eclipse project loaded into the local Sandbox using code along the lines of:
for(IComponentHandle component : components) {
// Obtain the List of Folders that have been changed for that component
Collection<IVersionableHandle> projects = workspaceWrapper.getProjectsChanged(component);
// Setup the request for load
loadOperation.requestLoad(eclipseSandbox, null, workspaceWrapper.getConnection(), component, projects);
}
// Evaluate the load requests that have been created
loadOperation.evaluateLoadRequests(null);

IComponentSyncManager syncMgr = FileSystemResourcesPlugin.getComponentSyncModel().getComponentSyncManager();
syncMgr.loading(workspaceWrapper.getConnection());
try {
loadOperation.run(null);
} finally {
    syncMgr.loadingDone(workspaceWrapper.getConnection());
}
I can see that the project has been correctly loaded onto disk but I'm unable to see it within Eclipse, I can use eclipse API to add the project into eclipse but it does not have the connection with the repository workspace.  How using the API can I achieve this connection?

Thanks

Adam

Accepted answer


permanent link
Tim Mok (6.6k38) | answered May 31 '13, 11:03 a.m.
JAZZ DEVELOPER
The load operation has a method #setEclipseSpecificLoadOptions(int) to set the option to import projects.
Adam Coulthard selected this answer as the correct answer

Comments
Adam Coulthard commented Jun 03 '13, 3:33 a.m.

Thanks Tim that did the trick, I'm not sure how I missed that one. 

Your answer


Register or to post 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.