Problem creating new repository workspace client
Yehiel Glass (255●4●89●86)
| asked Nov 04 '13, 11:19 a.m.
retagged Dec 16 '13, 4:15 p.m. by David Lafreniere (4.8k●7) Hello, When I create new repository workspace (client side), the workspace is created but without component. What am I missing? IWorkspaceConnection myNewWKSP = wm.createWorkspace(LogedInUser, "pluginWorkspace", "Merge detector" , monitor);
Thanks, Yehiel |
Accepted answer
One possibility to create a new workspace from an existing one is to call:
com.ibm.team.scm.client.internal.WorkspaceManager.createWorkspace(IContributorHandle, String, String, IWorkspaceConnection, IWorkspaceConnection, IProgressMonitor). The first IWorkspaceConnection parameter represents your flow target, the second represents the workspace you wish to copy. With the original call posted here, you would need to explicitly add components with com.ibm.team.scm.client.IFlowNodeConnection.IComponentOpFactory.addComponent(IComponentHandle, boolean) and com.ibm.team.scm.client.IFlowNodeConnection.applyComponentOperations(List, IProgressMonitor). ... List<IComponentAdditionOp> componentOps = new ArrayList<IComponentAdditionOp>(components.size()); componentOps.add(myNewWKSP.componentOpFactory().addComponent(components.get(0), false)); myNewWKSP.applyComponentOperations(componentOps, monitor); ... Yehiel Glass selected this answer as the correct answer
|
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.
Comments
Hi ,
I thoght to copy the workspace, but I don't know what is the parameter for IAuditableHandle :
com.ibm.team.scm.client.IWorkspaceManager.copyWorkspace(IAuditableHandle arg0, IWorkspaceConnection arg1, String arg2, String arg3, IProgressMonitor arg4)
Maybe you know what is the IAuditableHandle arg0 ?