public class Searcher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
Searcher.SearchCallback |
Constructor and Description |
---|
Searcher(IProject project,
SearchExpression searchExpression)
Create new searcher instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkEntry(java.lang.String srcText,
java.lang.String locText,
java.lang.String note,
java.lang.String[] properties,
TMXEntry entry,
int entryNum,
java.lang.String intro)
Check if specified entry should be found.
|
SearchExpression |
getExpression() |
java.util.List<SearchMatch> |
getFoundMatches() |
java.util.List<SearchResultEntry> |
getSearchResults()
Returns list of search results
|
void |
search()
Search for this.expression and return a list of results.
|
boolean |
searchString(java.lang.String origText)
Looks for an occurrence of the search string(s) in the supplied text string.
|
boolean |
searchString(java.lang.String origText,
boolean collapseResults)
Looks for an occurrence of the search string(s) in the supplied text string.
|
void |
searchText(java.lang.String seg,
java.lang.String translation,
java.lang.String filename) |
void |
setThread(LongProcessThread thread)
Set thread for checking interruption.
|
public Searcher(IProject project, SearchExpression searchExpression)
project
- Current projectpublic void setThread(LongProcessThread thread)
public SearchExpression getExpression()
public java.util.List<SearchResultEntry> getSearchResults()
public void search() throws java.lang.Exception
java.lang.Exception
- when searching files goes wrongprotected void checkEntry(java.lang.String srcText, java.lang.String locText, java.lang.String note, java.lang.String[] properties, TMXEntry entry, int entryNum, java.lang.String intro)
srcText
- source textlocText
- translation textnote
- note textproperties
- propertiesentry
- entry. Null for external tmx entries (so we can only search for source and translation in external
tmx)entryNum
- entry numberintro
- filepublic boolean searchString(java.lang.String origText)
origText
- The text string to search inpublic boolean searchString(java.lang.String origText, boolean collapseResults)
origText
- The text string to search incollapseResults
- True if the adjacent results should be collapsed. This can happen on search, but not on replace.public java.util.List<SearchMatch> getFoundMatches()
public void searchText(java.lang.String seg, java.lang.String translation, java.lang.String filename)