|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.editor.SearchOptions
This object stores search options and is passed to the various SearchManager methods.
Field Summary | |
protected boolean |
caseSensitive
If true, the search is case sensitive, otherwise it's case insensitive. |
protected java.lang.String |
escapedSearchText
Search for this text. |
protected RegularExpression[] |
filenameFilters
Holds the filename filters, each expressed as a regular expression. |
protected boolean |
forwardSearch
If true, the search is in the forward direction, otherwise in the backward direction. |
protected boolean |
fromCursor
If true, the search is from the cursor, otherwise it's from the top of the file. |
protected boolean |
globalSearch
If false, the search is in the selected text only, otherwise it is in all text. |
protected boolean |
promptReplace
If true, prompt the user before each replace, otherwise don't prompt the user. |
protected boolean |
recurseDirectories
If true, search directories recursively, otherwise search only one directory. |
protected boolean |
regExp
If true, the search uses (limited) regular expressions, otherwise it doesn't. |
protected java.lang.String |
replaceText
Replace with this text. |
protected java.lang.String |
searchText
Search for this text. |
protected boolean |
wholeWordsOnly
If true, search for whole words only, otherwise search for any occurrence. |
Constructor Summary | |
SearchOptions()
Construct a new SearchOptions object with default settings. |
|
SearchOptions(SearchOptions opts)
Construct a new SearchOptions object using settings from another SearchOptions object. |
Method Summary | |
java.lang.String |
getEscapedSearchText()
Get the most recent search text, and escape all escape ('\') chars. |
RegularExpression[] |
getFilenameFilters()
Get the RegularExpression array to use to filter filenames during a path search. |
java.lang.String |
getReplaceText()
Get the most recent replace text. |
java.lang.String |
getSearchText()
Get the most recent search text. |
boolean |
isCaseSensitive()
Get the case sensistive setting. |
boolean |
isForwardSearch()
Get the forward search setting. |
boolean |
isFromCursor()
Get the origin from cursor setting. |
boolean |
isGlobalSearch()
Get the global search setting. |
boolean |
isPromptReplace()
Get the prompt on replace setting. |
boolean |
isRecurseDirectories()
Get the recurse directories setting. |
boolean |
isRegExp()
Get the regular expressions setting. |
boolean |
isWholeWordsOnly()
Get the whole words only setting. |
void |
setCaseSensitive(boolean b)
Set the case sensitive setting. |
void |
setFilenameFilters(RegularExpression[] filters)
Set the RegularExpression to use to filter filenames during a path search. |
void |
setForwardSearch(boolean b)
Set the forward search setting. |
void |
setFromCursor(boolean b)
Set the origin from cursor setting. |
void |
setGlobalSearch(boolean b)
Set the global search setting. |
void |
setPromptReplace(boolean b)
Set the prompt on replace setting. |
void |
setRecurseDirectories(boolean b)
Set the recurse directories setting. |
void |
setRegExp(boolean b)
Set the regular expressions setting. |
void |
setReplaceText(java.lang.String text)
Set the most recent replace text. |
void |
setSearchText(java.lang.String text)
Set the most recent search text. |
void |
setWholeWordsOnly(boolean b)
Set the whole words only setting. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String searchText
protected java.lang.String replaceText
protected java.lang.String escapedSearchText
protected boolean caseSensitive
protected boolean regExp
protected boolean forwardSearch
protected boolean globalSearch
protected boolean fromCursor
protected boolean promptReplace
protected boolean wholeWordsOnly
protected boolean recurseDirectories
protected RegularExpression[] filenameFilters
Constructor Detail |
public SearchOptions()
public SearchOptions(SearchOptions opts)
opts
- The SearchOptions object to use to initialize this one.Method Detail |
public java.lang.String getSearchText()
public java.lang.String getEscapedSearchText()
public void setSearchText(java.lang.String text)
text
- The most recent search text.public java.lang.String getReplaceText()
public void setReplaceText(java.lang.String text)
text
- The most recent text used as a replacement string.public boolean isCaseSensitive()
public void setCaseSensitive(boolean b)
b
- The new case sensitive setting.public boolean isRegExp()
public void setRegExp(boolean b)
b
- The new regular expressions setting.public boolean isForwardSearch()
public void setForwardSearch(boolean b)
b
- The new foward search setting. True to search forward, false to
search backwards.public boolean isGlobalSearch()
public void setGlobalSearch(boolean b)
b
- The new global search setting. True to search all of the text,
false to search only the selected text.public boolean isFromCursor()
public void setFromCursor(boolean b)
b
- The new origin from cursor setting. True to search from the cusor
position, false to search from the top (or bottom) of the file.public boolean isPromptReplace()
public void setPromptReplace(boolean b)
b
- The new prompt on replace setting. True to prompt before a replace
operation is performedpublic boolean isRecurseDirectories()
public void setRecurseDirectories(boolean b)
b
- True if a path search using this set of options should recursively
search subdirectories.public boolean isWholeWordsOnly()
public void setWholeWordsOnly(boolean b)
b
- True if a search using this set of options should only consider
whole words, not parts of words.public RegularExpression[] getFilenameFilters()
public void setFilenameFilters(RegularExpression[] filters)
filter
- An array of RegularExpression objects to use to filter
filenames during a path search.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |