Package editor

Class GosuDocument

    • Constructor Detail

      • GosuDocument

        public GosuDocument()
    • Method Detail

      • createScanner

        public GosuDocument.Scanner createScanner()
        Returns:
        A new lexical analyzer for this document.
      • setLocations

        public void setLocations​(List<IParseTree> locations)
        The parsed Locations for the document.
      • setLocationsOffset

        public void setLocationsOffset​(int locationsOffset)
      • hasErrorStartingAt

        public boolean hasErrorStartingAt​(int iPos)
      • getStyleCodeAtPosition

        public Integer getStyleCodeAtPosition​(int iPosition)
        Returns a style code for the absolute position in the document or null if no code is mapped.
      • getScannerStart

        public int getScannerStart​(int p)
        Fetch a reasonable location to start scanning given the desired start location. This allows for adjustments needed to accomodate multiline comments.
      • insertUpdate

        protected void insertUpdate​(AbstractDocument.DefaultDocumentEvent chng,
                                    AttributeSet attr)
        Updates document structure as a result of text insertion. This will happen within a write lock. The superclass behavior of updating the line map is executed followed by marking any comment areas that should backtracked before scanning.
        Overrides:
        insertUpdate in class PlainDocument
        Parameters:
        chng - the change event
        attr - the set of attributes
      • removeUpdate

        protected void removeUpdate​(AbstractDocument.DefaultDocumentEvent chng)
        Updates any document structure as a result of text removal. This will happen within a write lock. The superclass behavior of updating the line map is executed followed by placing a lexical update command on the analyzer queue.
        Overrides:
        removeUpdate in class PlainDocument
        Parameters:
        chng - the change event
      • setTokenizerInstructor

        public void setTokenizerInstructor​(ITokenizerInstructor tokenizerInstructor)