|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.editor.SearchManager
This object stores search options and manages the search history lists. This class also contains the implementation of many of the search-related features in the editor.
Inner Class Summary | |
static class |
SearchManager.BackgroundSearchThread
|
static class |
SearchManager.FindAllMessage
|
static class |
SearchManager.RemoveMessageAction
|
static class |
SearchManager.SearchListener
|
static class |
SearchManager.SearchPathResultMessage
|
Field Summary | |
static com.borland.primetime.editor.SearchManager.SearchMessageCategory |
CATEGORY_SEARCH
|
Constructor Summary | |
SearchManager()
|
Method Summary | |
static void |
addFileFilterText(java.lang.String text)
Add an entry to the history list used for file filters. |
static void |
addPathText(java.lang.String text)
Add an entry to the history list used for search paths. |
static void |
addReplaceText(java.lang.String text)
Add an entry to the history list used for replace text. |
static void |
addSearchText(java.lang.String text)
Add an entry to the history list used for search text. |
static void |
findMatches(EditorPane editor,
java.io.InputStream stream,
SearchOptions opts)
Find all of the matches of a particular string within an input stream. |
static void |
findMatches(EditorPane editor,
java.io.InputStream stream,
SearchOptions opts,
SearchResultsListener listener)
Find all of the matches of a particular strings within an input stream. |
static void |
findText(EditorPane editor,
SearchOptions opts)
Find some text in a particular editor. |
static javax.swing.ComboBoxModel |
getFileFilterHistory()
Get the file filter history list. |
static javax.swing.ComboBoxModel |
getPathHistory()
Get the path history list. |
static javax.swing.ComboBoxModel |
getReplaceHistory()
Get the replace history list. |
static SearchOptions |
getSavedOptions()
Get the most recently used set of search options. |
static javax.swing.ComboBoxModel |
getSearchHistory()
Get the search history list. |
static void |
incrementalSearch(EditorPane editor,
boolean forward)
Start an incremental search. |
static void |
repeatReplace(EditorPane editor)
Find some text in a particular editor and replace it with different text. |
static void |
repeatSearch(EditorPane editor)
Repeat the previous search. |
static void |
replaceAllText(EditorPane editor,
SearchOptions opts)
Find some text in a particular editor and replace it with different text. |
static void |
replaceText(EditorPane editor,
SearchOptions opts)
Find some text in a particular editor and replace it with different text. |
static RegularExpression.MatchResult |
search(char[] text,
SearchOptions opts,
int startOffset,
int endOffset)
Search a character array for a particular string. |
static RegularExpression.MatchResult |
search(javax.swing.text.Document doc,
SearchOptions opts,
int startOffset,
int endOffset)
Search the document for a particular string. |
static void |
searchInputStream(Browser browser,
Project project,
java.io.InputStream stream,
Url path,
SearchOptions opts,
Message parentMsg)
This methods looks for at least one instance of the search text in the stream. |
static void |
searchPaths(Browser browser,
Project project,
Url[] paths,
SearchOptions opts)
Search Paths. |
static void |
setSavedOptions(SearchOptions options)
Set the set of search options to remember. |
static void |
showNoMatchDialog(java.awt.Component parentComponent,
java.lang.String searchText)
Inform the user that no match was found. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final com.borland.primetime.editor.SearchManager.SearchMessageCategory CATEGORY_SEARCH
Constructor Detail |
public SearchManager()
Method Detail |
public static void setSavedOptions(SearchOptions options)
options
- The SearchOptions object to store.public static SearchOptions getSavedOptions()
public static void addSearchText(java.lang.String text)
text
- The most recent search text.public static void addReplaceText(java.lang.String text)
text
- The most recent text used as a replacement string.public static void addPathText(java.lang.String text)
text
- The most recent path text.public static void addFileFilterText(java.lang.String text)
text
- The most recent file filter text.public static javax.swing.ComboBoxModel getSearchHistory()
public static javax.swing.ComboBoxModel getReplaceHistory()
public static javax.swing.ComboBoxModel getPathHistory()
public static javax.swing.ComboBoxModel getFileFilterHistory()
public static RegularExpression.MatchResult search(javax.swing.text.Document doc, SearchOptions opts, int startOffset, int endOffset)
doc
- The document to search.startOffset
- The location from which to start the search.opts
- The SearchOptions object that describes the options to use.RegularExpress.NOMATCH
is returned.public static RegularExpression.MatchResult search(char[] text, SearchOptions opts, int startOffset, int endOffset)
text
- The character array to search.opts
- The SearchOptions object that describes the options to use.startOffset
- The location from which to start the search.endOffset
- The location at which to end the search.RegularExpress.NOMATCH
is returned.public static void findText(EditorPane editor, SearchOptions opts)
editor
- The editor containing the text to be searched.opts
- The SearchOptions object that describes the options to use.public static void replaceText(EditorPane editor, SearchOptions opts)
editor
- The editor containing the text to be replaced.opts
- The SearchOptions object that describes the options to use.public static void replaceAllText(EditorPane editor, SearchOptions opts)
editor
- The editor containing the document to be searched.opts
- The SearchOptions object that describes the options to use.public static void incrementalSearch(EditorPane editor, boolean forward)
editor
- The EditorPane containing the text to be searched.public static void repeatSearch(EditorPane editor)
editor
- The editor containing the text to be searched.public static void repeatReplace(EditorPane editor)
editor
- The editor containing the text to be replaced.public static void findMatches(EditorPane editor, java.io.InputStream stream, SearchOptions opts)
editor
- the EditorPane that contains the stream being searched.stream
- The input stream to searchopts
- The SearchOptions object that describes the options to use.public static void findMatches(EditorPane editor, java.io.InputStream stream, SearchOptions opts, SearchResultsListener listener)
editor
- the EditorPane that contains the stream being searched.stream
- The input stream to searchopts
- The SearchOptions object that describes the options to use.listener
- The SearchResultsListener to be notified when a match is
found.public static void searchPaths(Browser browser, Project project, Url[] paths, SearchOptions opts)
browser
- The browser in which to display the search results.project
- The active project.paths
- An array of Url objects containing the base paths to search.opts
- The SearchOptions object containing the search options.SearchSourcePathDialog.
,
SearchOptions
public static void searchInputStream(Browser browser, Project project, java.io.InputStream stream, Url path, SearchOptions opts, Message parentMsg)
browser
- The browser in which to display the search results.project
- The active project.stream
- The input stream to searchpath
- A Url object representing the directory to search.opts
- The SearchOptions object containing the search options.parentMsg
- The Message object to which new result messages should be
parented.public static void showNoMatchDialog(java.awt.Component parentComponent, java.lang.String searchText)
parentComponent
- The component to use as the parent of the dialog.searchText
- The text that was being searched for.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |