|
RSE Release 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResult
public class RemoteSearchResult
The RemoteSearchResultImpl class is an implementation of IRemoteSearchResult. It is used for storing information about a particular search result.
| Nested Class Summary | |
|---|---|
protected class |
RemoteSearchResult.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 | |
|---|---|
RemoteSearchResult(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()
Returns the char start offset of the first match. |
int |
getCharEnd(int matchIndex)
Gets the char end offset for the given match index. |
int |
getCharStart()
Returns the char end offset of the first match. |
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()
Gets the line number within a file that this references if it references any. |
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 RemoteSearchResult(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 IHostSearchResultgetText in interface IRemoteSearchResultIRemoteSearchResult.getText()public int getLine()
IRemoteLineReference
getLine in interface IRemoteLineReferencegetLine in interface IHostSearchResultIRemoteLineReference.getLine()public int getIndex()
IHostSearchResult
getIndex in interface IHostSearchResultgetIndex in interface IRemoteSearchResultIRemoteSearchResult.getIndex()public String getAbsolutePath()
getAbsolutePath in interface IRemoteLineReferencegetAbsolutePath in interface IHostSearchResultpublic Object getParent()
getParent in interface IRemoteLineReferencegetParent in interface IHostSearchResultpublic Object getAdapter(Class adapterType)
getAdapter in interface IAdaptableadapterType - 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 IHostSearchResultgetMatchingSearchString in interface IRemoteSearchResult
public void addMatch(int startOffset,
int endOffset)
addMatch in interface IHostSearchResultaddMatch in interface IRemoteSearchResultstartOffset - 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 IHostSearchResultnumOfMatches in interface IRemoteSearchResultpublic int getCharStart(int matchIndex)
getCharStart in interface IHostSearchResultgetCharStart in interface IRemoteSearchResultmatchIndex - the match index. For example, to get the start offset for the first match, specify 0.
public int getCharEnd(int matchIndex)
getCharEnd in interface IHostSearchResultgetCharEnd in interface IRemoteSearchResultmatchIndex - the match index. For example, to get the end offset for the first match, specify 0.
public int getCharEnd()
getCharEnd in interface IRemoteLineReferenceIRemoteLineReference.getCharEnd()public int getCharStart()
getCharStart in interface IRemoteLineReferenceIRemoteLineReference.getCharStart()public IHostSearchResultConfiguration getConfiguration()
getConfiguration in interface IHostSearchResultpublic void setParent(Object parent)
setParent in interface IHostSearchResult
|
RSE Release 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||