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
Representation of finded text in files by text search
-
Nested Class Summary
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.search.core.provider.IMatchParentProvider
IMatchParentProvider.Factory, IMatchParentProvider.Registry -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTextSearchFileMatch(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 -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(TextSearchFileMatch other) booleanReturns the element that contains this match.org.eclipse.core.resources.IFilegetFile()Returns file containing the search textintReturns offset index of finded text in filelongReturns line number of finded text in filegetText()Returns part of file text containing the search textintReturns length of finded textintReturns offset index of finded text in text partinthashCode()Methods inherited from class com._1c.g5.v8.dt.search.core.Match
getMetadataTopObjectId, getModel, isFiltered, resolveObjectById, setFiltered
-
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 benullfile- the file containing the search text, cannot benulltext- the part of file text containing the search text, cannot benulltextOffset- the offset index of finded text in text parttextLength- the length of finded textfileOffset- the offset index of finded text in filelineNumber- the line number of finded text in file
-
-
Method Details
-
getElement
Description copied from class:MatchReturns the element that contains this match. The element is used to group the match.- Specified by:
getElementin classMatch- 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
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
- Specified by:
compareToin interfaceComparable<TextSearchFileMatch>
-
hashCode
public int hashCode() -
equals
-