Class TextSearchFileMatch

    • Constructor Detail

      • TextSearchFileMatch

        public TextSearchFileMatch​(IBmModel model,
                                   org.eclipse.core.resources.IFile file,
                                   String text,
                                   int textOffset,
                                   int textLength,
                                   int fileOffset,
                                   long lineNumber)
        Create instance of text search file match
        Parameters:
        model - the BM model contain matched object, cannot be null
        file - the file containing the search text, cannot be null
        text - the part of file text containing the search text, cannot be null
        textOffset - the offset index of finded text in text part
        textLength - the length of finded text
        fileOffset - the offset index of finded text in file
        lineNumber - the line number of finded text in file
    • Method Detail

      • getElement

        public Object getElement()
        Description copied from class: Match
        Returns the element that contains this match. The element is used to group the match.
        Specified by:
        getElement in class Match
        Returns:
        the element that contains this match, cannot be null
      • getFile

        public org.eclipse.core.resources.IFile getFile()
        Returns file containing the search text
        Returns:
        the file, never null
      • getText

        public String getText()
        Returns part of file text containing the search text
        Returns:
        the text, never null
      • getTextOffset

        public int getTextOffset()
        Returns offset index of finded text in text part
        Returns:
        offset index of finded text in text part
      • getTextLength

        public int getTextLength()
        Returns length of finded text
        Returns:
        the text length
      • getFileOffset

        public int getFileOffset()
        Returns offset index of finded text in file
        Returns:
        the text offset in file
      • getLineNumber

        public long getLineNumber()
        Returns line number of finded text in file
        Returns:
        the line number
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Match