How to delete the workspace programmatically in RTC SCM API
![]() Hello All,
|
One answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Jun 06 '17, 8:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 06 '17, 8:22 a.m. I believe you use the same API you used to create the workspace to delete it: com.ibm.team.scm.client.IWorkspaceManager.deleteWorkspace(IWorkspaceHandle, IProgressMonitor)
Comments Thanks for the reply Ralph.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If you want to do this kind of work, you basically have to learn how to search in the SDK. Finding the IWorkspaceManager.deleteWorkspace() after the createWorkspace was already at IWorkspaceManager is a no brainer. Searching for IWorkspaceManager.deleteWorkspace() in the SDK is a 30 seconds operation and finding one of the first is SCMPlatform.getWorkspaceManager(workspace.teamRepository()).deleteWorkspace(workspace.getResolvedWorkspace(), null); which shows that com.ibm.team.scm.client.IFlowNodeConnection.getResolvedWorkspace() always returns the IWorkspace which is its own handle. Before you ask com.ibm.team.scm.client.IWorkspaceConnection extends com.ibm.team.scm.client.IFlowNodeConnection. The easiest way to search is to open a class or method, right click at it and open the declaration. On the declaration right click and select References to search for them.
Another is to use Java Search, type in names (with asterisk if needed) and search for classes, interfaces and methods.
|
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.