range = editor.getSelectionHelper().getOrderedSelectionRange();
if (range == null)
throw new SEditorException("A valid range must be provided or a selection must be active");
return range;
}
<BUG>public void setAnnotation(String name, String value, @JsOptional Range range) throws SEditorException {
</BUG>
if (!editor.isEditing())
<BUG>return;
</BUG>
Annotation antn = AnnotationRegistry.get(name);

range = editor.getSelectionHelper().getOrderedSelectionRange();
if (range == null)
throw new SEditorException("A valid range must be provided or a selection must be active");
return range;
}
public AnnotationInstance setAnnotation(String name, String value, @JsOptional Range range) throws SEditorException {
if (!editor.isEditing())
return null;
Annotation antn = AnnotationRegistry.get(name);
