It's all about the answers!

Ask a question

Help tagging a build

Steve Woodruff (5132) | asked Nov 23 '11, 11:18 a.m.

I want to apply a tag to specific builds. I am able to get the IBuildResult handle but when I try to do setTags(), I get an exception:

IBuildResult buildResult = (IBuildResult) result;
if(buildResult.getLabel().equals("20111123-1018")) {

Caused by:
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(

Is there a different way I should be doing this?



2 answers

permanent link
Steve Woodruff (5132) | answered Nov 23 '11, 1:55 p.m.
Duh. Needed to get a workingCopy of the buildResult. Now its fine.

For sake of sharing ...

IBuildResult buildResult = (IBuildResult) buildResult.getWorkingCopy();
String existing_tags = buildResult.getTags();
buildResult.setTags("" + existing_tags + " " + tag);, monitor);


permanent link
Nick Edgar (6.5k711) | answered Dec 01 '11, 11:24 p.m.
Yup, looks good, except that the tags should be comma-separated.

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.