Class TextSearchFileMatch

java.lang.Object
com._1c.g5.v8.dt.search.core.Match
com._1c.g5.v8.dt.search.core.text.TextSearchFileMatch
All Implemented Interfaces:
IMatchParentProvider, Comparable<TextSearchFileMatch>
Direct Known Subclasses:
BslTextSearchMatch

public class TextSearchFileMatch extends Match implements Comparable<TextSearchFileMatch>
Representation of finded text in files by text search
  • Constructor Details

    • 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 Details

    • 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
    • compareTo

      public int compareTo(TextSearchFileMatch other)
      Specified by:
      compareTo in interface Comparable<TextSearchFileMatch>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Match
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Match