if (caret.hasAnnotation(key)) {
return; // skip, user already set one.
}
boolean inheritFromRight = false;
InheritDirection direction = InheritDirection.INSIDE;
Iterator<AnnotationBehaviour> behaviours = registry.getBehaviours(key);
if (!behaviours.hasNext()) {
// no behaviour defined, so inherit from right if explicitly set:
inheritFromRight = (bias == BiasDirection.RIGHT);
} else {