Rename Baseline in Plain Java API
I want to rename a baseline (something that you can do via the client), but the IBaseline object does not seem to have a method that allows the name to be changed. Is this correct? Is there another way of doing it? IWorkspaceManager workspaceManager = (IWorkspaceManager)repo.getClientLibrary(IWorkspaceManager.class); |
Accepted answer
You should go through IWorkspaceManager#getBaselineConnection(IBaselineHandle, IProgressMonitor) to get the baseline connection.
Then call IBaselineConnection#setName(String) to set the new name. Stephen Long 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
usually the I* interfaces has concrete classes behind them which hav the set....() methods.. usually the concrete classes are usually in 'internal' jar files.
so IBaseLine = Baseline.
Sam,
Thanks. Seems I need to get a working copy of the object. I can now call setName ok, but cannot see how to save the object back to the repository...
Baseline theBaseline = (Baseline)baseline_comp.getWorkingCopy();
theBaseline.setName(newBaseline);