import jalview.bin.JalviewLite;
import jalview.commands.CommandI;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
import jalview.datamodel.SearchResults;
StringBuilder seqs = new StringBuilder(consensus.annotations.length);
for (int i = 0; i < consensus.annotations.length; i++)
{
- if (consensus.annotations[i] != null)
+ Annotation annotation = consensus.annotations[i];
+ if (annotation != null)
{
- if (consensus.annotations[i].description.charAt(0) == '[')
+ String description = annotation.description;
+ if (description != null && description.startsWith("["))
{
- seqs.append(consensus.annotations[i].description.charAt(1));
+ // consensus is a tie - just pick the first one
+ seqs.append(annotation.description.charAt(1));
}
else
{
- seqs.append(consensus.annotations[i].displayCharacter);
+ seqs.append(annotation.displayCharacter);
}
}
}