try {
Position[] positions = event.getDocument().getPositions(
_category);
for (int i = 0; i != positions.length; i++) {
HighlightedPosition position = (HighlightedPosition) positions[i];
// Also update deleted positions because they get deleted by the background thread and removed/invalidated only in the UI runnable
// if (position.isDeleted())
// continue;
int offset = position.getOffset();
int length = position.getLength();
int end = offset + length;
if (offset > eventEnd) {
updateWithPrecedingEvent(position, event);
} else if (end < eventOffset) {