/**
* @param editorDiv
* @return local annotations of the editor owning div
*/
public static String webdriverEditorGetLocalDiffAnnotations(Element editorDiv) {
Editor editor = getByEditorDiv(editorDiv);
if (editor == null) {
return "Error in webdriverEditorGetContent";
}
// This must not be called synchronously in the same key event before the dom is modified.
EditorTestingUtil.forceFlush(editor);
StringBuilder ans = new StringBuilder("");
ReadableStringSet keys = CollectionUtils.newStringSet(
DiffHighlightingFilter.DIFF_INSERT_KEY,
DiffHighlightingFilter.DIFF_DELETE_KEY);
MutableAnnotationSet.Local annotations = editor.getContent().getLocalAnnotations();
annotations.annotationIntervals(0, annotations.size(), keys);
for (AnnotationInterval<Object> interval :
annotations.annotationIntervals(0, annotations.size(), keys)) {
boolean isInsertion = interval.annotations()