Set<String> codesetNames = codesets.getValue();
mon.beginTask("Import guide content", codesetNames.size()+1);
try {
for (String name : codesetNames) {
CodeSet cs = g.getCodeSet(name);
if (cs==null) {
//Ignore 'invalid' codesets. This is a bit of a hack so that we can retain selected codeset names
// across guide selection changes. To do that we remember 'selected' cs names even if they
// aren't valid for the current guide. That way the checkbox state stays consistent
// when switching between guides (otherwise 'invalid' names would have to be cleared when switching to