fEditor.resetHighlightRange();
} else {
Object element = selection.getFirstElement();
Assert.isTrue(element instanceof ATGSegment);
ATGSegment segment = (ATGSegment)element;
CocoPosition pos = segment.getPosition();
try {
fEditor.resetHighlightRange(); // force the cursor being moved
fEditor.setHighlightRange(pos.getOffset(), pos.getLength(), true);
} catch (IllegalArgumentException x) {
fEditor.resetHighlightRange();
}
}
}