Class TextAreaAdapter

    • Constructor Detail

      • TextAreaAdapter

        public TextAreaAdapter​(javafx.scene.control.TextArea textArea,
                               InputFormat inputFormat,
                               java.lang.String documentReference)
    • Method Detail

      • getTextArea

        public javafx.scene.control.TextArea getTextArea()
      • setInputFormat

        public void setInputFormat​(InputFormat inputFormat)
      • getExternalContent

        public ExternalContent getExternalContent()
        Description copied from interface: InputAdapterInterface
        Receives the external text from the editor. Only supported with Acrolinx Platform 2019.10 (Sidebar version 14.16) and newer. Return null if not used.
        Specified by:
        getExternalContent in interface InputAdapterInterface
        Returns:
        Returns the object for external content.
      • getDocumentReference

        public java.lang.String getDocumentReference()
        Description copied from interface: InputAdapterInterface
        The path or filename of the document to check. In a CMS, it can be the id that is used to look up the document.
        Specified by:
        getDocumentReference in interface InputAdapterInterface
      • setDocumentReference

        public void setDocumentReference​(java.lang.String documentReference)
      • selectRanges

        public void selectRanges​(java.lang.String checkId,
                                 java.util.List<AcrolinxMatch> acrolinxMatches)
        Description copied from interface: InputAdapterInterface
        Is called by the Acrolinx Integration to highlight current issues in the text editor.

        Note that the matches contain the ranges as found in the originally checked text. It might be necessary to implement some lookup algorithm here to map these ranges to the current document (which might have changed in the meantime).

        Specified by:
        selectRanges in interface InputAdapterInterface
        Parameters:
        checkId - The current check id.
        acrolinxMatches - The ranges to be highlighted as sent by the AcrolinxServer.
      • replaceRanges

        public void replaceRanges​(java.lang.String checkId,
                                  java.util.List<AcrolinxMatchWithReplacement> matches)
        Description copied from interface: InputAdapterInterface
        Is called by the Acrolinx Integration to replace found issues with suggestions from the Acrolinx Sidebar. If the Acrolinx Sidebar is configured as read only, this method won't be called.

        Note that the matches contain the ranges as found in the originally checked text. It might be necessary to implement some lookup algorithm here to map these ranges to the current document (which might have changed in the meantime).

        Specified by:
        replaceRanges in interface InputAdapterInterface
        Parameters:
        checkId - The current check id.
        matches - The ranges to be replaced.