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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.search.core.provider.IMatchParentProvider
IMatchParentProvider.Factory, IMatchParentProvider.Registry
-
-
Constructor Summary
Constructors Constructor Description 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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TextSearchFileMatch other)
boolean
equals(Object obj)
Object
getElement()
Returns the element that contains this match.org.eclipse.core.resources.IFile
getFile()
Returns file containing the search textint
getFileOffset()
Returns offset index of finded text in filelong
getLineNumber()
Returns line number of finded text in fileString
getText()
Returns part of file text containing the search textint
getTextLength()
Returns length of finded textint
getTextOffset()
Returns offset index of finded text in text partint
hashCode()
-
Methods inherited from class com._1c.g5.v8.dt.search.core.Match
getMetadataTopObjectId, getModel, isFiltered, resolveObjectById, setFiltered
-
-
-
-
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 benull
file
- the file containing the search text, cannot benull
text
- the part of file text containing the search text, cannot benull
textOffset
- 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 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 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
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 interfaceComparable<TextSearchFileMatch>
-
-