Class TextSearchMatchAccess

    • Constructor Detail

      • TextSearchMatchAccess

        public TextSearchMatchAccess()
    • Method Detail

      • getFile

        public abstract IFile getFile()
        Returns the file the match was found in.
        Returns:
        the file the match was found.
      • getMatchOffset

        public abstract int getMatchOffset()
        Returns the offset of this search match.
        Returns:
        the offset of this search match
      • getMatchLength

        public abstract int getMatchLength()
        Returns the length of this search match.
        Returns:
        the length of this search match
      • getFileContentLength

        public abstract int getFileContentLength()
        Returns the length of this file's content.
        Returns:
        the length of this file's content.
      • getFileContentChar

        public abstract char getFileContentChar​(int offset)
        Returns a character of the file's content at the given offset
        Parameters:
        offset - the offset
        Returns:
        the character at the given offset
        Throws:
        IndexOutOfBoundsException - an IndexOutOfBoundsException is thrown when the offset is negative or not less than the file content's length.
      • getFileContent

        public abstract String getFileContent​(int offset,
                                              int length)
        Returns the file's content at the given offsets.
        Parameters:
        offset - the offset of the requested content
        length - the of the requested content
        Returns:
        the substring of the file's content
        Throws:
        IndexOutOfBoundsException - an IndexOutOfBoundsException is thrown when the offset or the length are negative or when offset + length is not less than the file content's length.