Interval toSelect = getIntervalToSelect(pos);
TextComponentUtils.select(component, toSelect);
}
private Interval getIntervalToSelect(int pos) {
Partition part = partitioner.getPartitionAt(pos);
if (isSelectableToken(part)) {
return getTokenInterval(part);
} else {
return getWordInterval(pos);
}