for (Iterator iter = colors.iterator(); iter.hasNext();) {
Color col = (Color) iter.next();
setHighlightColor(col);
Set s = (Set)colorToLocation.get(col);
for (Iterator iterator = s.iterator(); iterator.hasNext();) {
Location loc = (Location) iterator.next();
try {
h.addHighlight(loc.getStartPosition(),
loc.getEndPosition(), myHighlightPainter);
} catch (BadLocationException ble){
log.warning("highlighting error");
}
}
}