Class ACLSyntaxDocument

  • All Implemented Interfaces:
    Serializable, Document

    public class ACLSyntaxDocument
    extends PlainDocument
    The interface a document must implement to be colorizable by the jEdit text area component. The original file is written by Slava Pestov (www.gjt.org) and altered to fit ACL/SL.
    Author:
    Chris van Aart - Acklin B.V., the Netherlands & Slava Pestov
    See Also:
    Serialized Form
    • Constructor Detail

      • ACLSyntaxDocument

        public ACLSyntaxDocument()
    • Method Detail

      • getTokenMarker

        public ACLSLTokenMarker getTokenMarker()
        Returns the token marker that is to be used to split lines of this document up into tokens. May return null if this document is not to be colorized.
        Returns:
        The TokenMarker value
      • setTokenMarker

        public void setTokenMarker​(ACLSLTokenMarker tm)
        Sets the token marker that is to be used to split lines of this document up into tokens. May throw an exception if this is not supported for this type of document.
        Parameters:
        tm - The new token marker
      • tokenizeLines

        public void tokenizeLines()
        Reparses the document, by passing all lines to the token marker. This should be called after the document is first loaded.
      • tokenizeLines

        public void tokenizeLines​(int start,
                                  int len)
        Reparses the document, by passing the specified lines to the token marker. This should be called after a large quantity of text is first inserted.
        Parameters:
        start - The first line to parse
        len - The number of lines, after the first one to parse
      • fireInsertUpdate

        protected void fireInsertUpdate​(DocumentEvent evt)
        We overwrite this method to update the token marker state immediately so that any event listeners get a consistent token marker.
        Overrides:
        fireInsertUpdate in class AbstractDocument
        Parameters:
        evt - Description of Parameter
      • fireRemoveUpdate

        protected void fireRemoveUpdate​(DocumentEvent evt)
        We overwrite this method to update the token marker state immediately so that any event listeners get a consistent token marker.
        Overrides:
        fireRemoveUpdate in class AbstractDocument
        Parameters:
        evt - Description of Parameter