|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.services.search.AbstractSearchResult
public class AbstractSearchResult
The RemoteSearchResultImpl class is an implementation of IRemoteSearchResult. It is used for storing information about a particular search result.
Nested Class Summary | |
---|---|
protected class |
AbstractSearchResult.RemoteSearchResultMatch
|
Field Summary |
---|
Fields inherited from interface org.eclipse.rse.services.search.IHostSearchResult |
---|
SEARCH_RESULT_CLOSE_DELIMITER, SEARCH_RESULT_DELIMITER, SEARCH_RESULT_INDEX_DELIMITER, SEARCH_RESULT_OPEN_DELIMITER |
Constructor Summary | |
---|---|
AbstractSearchResult(IHostSearchResultConfiguration configuration,
Object parent,
SystemSearchString searchString)
Constructor to create a result. |
Method Summary | |
---|---|
void |
addMatch(int startOffset,
int endOffset)
Add a match to the result. |
String |
getAbsolutePath()
Gets the absolute path of the file for which the result was found. |
Object |
getAdapter(Class adapterType)
Gets the associated adapter for this search result. |
int |
getCharEnd()
|
int |
getCharEnd(int matchIndex)
Gets the char end offset for the given match index. |
int |
getCharStart()
|
int |
getCharStart(int matchIndex)
Gets the char start offset for the given match index. |
Object[] |
getChildren()
Returns children of the search result, if applicable. |
IHostSearchResultConfiguration |
getConfiguration()
|
int |
getIndex()
Gets the index of this search result in the context of its parent. |
String |
getLabel()
Gets the displayable label for this output. |
int |
getLine()
|
SystemSearchString |
getMatchingSearchString()
Gets the search string that this result matches. |
Object |
getParent()
Gets the containing object for the search result. |
String |
getText()
Gets the text to display for a search result. |
boolean |
hasChildren()
Indicates whether this search result has children |
int |
numOfMatches()
Gets the number of matches in this line. |
void |
setIndex(int index)
Sets the index of the search result in the context of its parent. |
void |
setLine(int line)
Sets the associated line number for the result. |
void |
setParent(Object parent)
|
void |
setText(String text)
Sets the displayable text for the search result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSearchResult(IHostSearchResultConfiguration configuration, Object parent, SystemSearchString searchString)
parent
- container of the result.searchString
- the search string for which the result was produced.Method Detail |
---|
public void setText(String text)
text
- the displayable text.public void setLine(int line)
line
- the line number.public void setIndex(int index)
index
- the index.public String getText()
IHostSearchResult
getText
in interface IHostSearchResult
public int getLine()
getLine
in interface IHostSearchResult
public int getIndex()
IHostSearchResult
getIndex
in interface IHostSearchResult
public String getAbsolutePath()
getAbsolutePath
in interface IHostSearchResult
public Object getParent()
getParent
in interface IHostSearchResult
public void setParent(Object parent)
setParent
in interface IHostSearchResult
public Object getAdapter(Class adapterType)
getAdapter
in interface IAdaptable
adapterType
- the adapter type.public Object[] getChildren()
null
for this implementation.public boolean hasChildren()
false
since there are no children.public String getLabel()
public SystemSearchString getMatchingSearchString()
getMatchingSearchString
in interface IHostSearchResult
public void addMatch(int startOffset, int endOffset)
addMatch
in interface IHostSearchResult
startOffset
- the char start offset, from the beginning of the file.endOffset
- the char end offset, from the beginning of the file.public int numOfMatches()
numOfMatches
in interface IHostSearchResult
public int getCharStart(int matchIndex)
getCharStart
in interface IHostSearchResult
matchIndex
- the match index. For example, to get the start offset for the first match, specify 0.
public int getCharEnd(int matchIndex)
getCharEnd
in interface IHostSearchResult
matchIndex
- the match index. For example, to get the end offset for the first match, specify 0.
public int getCharEnd()
public int getCharStart()
public IHostSearchResultConfiguration getConfiguration()
getConfiguration
in interface IHostSearchResult
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |