Class MoveCaretUtil


  • @API(type=INTERNAL,
         src=PUBLIC)
    public final class MoveCaretUtil
    extends java.lang.Object
    Utility to detect an editor variable in the Author page and move the caret to that place.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean hasImposedEditorVariableCaretOffset​(java.lang.String xmlFragment)
      Check if the imposed editor variable caret offset can be found in the XML fragment.
      static void moveCaretToImposedEditorVariableOffset​(AuthorAccess authorAccess, int insertionOffset)
      Move the caret to the offset imposed by a certain editor variable present in the Author page.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • hasImposedEditorVariableCaretOffset

        public static boolean hasImposedEditorVariableCaretOffset​(java.lang.String xmlFragment)
        Check if the imposed editor variable caret offset can be found in the XML fragment.
        Parameters:
        xmlFragment - The XML fragment.
        Returns:
        true if the imposed editor variable caret offset can be found in the XML fragment.
      • moveCaretToImposedEditorVariableOffset

        public static void moveCaretToImposedEditorVariableOffset​(AuthorAccess authorAccess,
                                                                  int insertionOffset)
        Move the caret to the offset imposed by a certain editor variable present in the Author page.
        Parameters:
        authorAccess - The author access.
        insertionOffset - The offset where the operation inserted the XML fragment.