com.borland.primetime.editor
Class SearchManager.SearchPathResultMessage

java.lang.Object
  |
  +--com.borland.primetime.ide.Message
        |
        +--com.borland.primetime.editor.SearchManager.SearchPathResultMessage
All Implemented Interfaces:
java.util.EventListener, SearchResultsListener
Enclosing class:
SearchManager

public static class SearchManager.SearchPathResultMessage
extends Message
implements SearchResultsListener

Helper class to store the editor related details of a message created from a match in a search in path. The main purpose of this class is to go to the place in the editor that corresponds to the match message when that message is clicked in the message view.


Fields inherited from class com.borland.primetime.ide.Message
actionEvent, background, contextAction, font, foreground, helpAction, icon, lazyFetchChildren, messageAction, renderer, selectAction, text, toolTipText
 
Constructor Summary
SearchManager.SearchPathResultMessage(Project project, MessageView mv, Url path, SearchOptions opts)
          Create a new object.
 
Method Summary
 void fetchChildren(Browser browser)
          Load the node where matches were found in an editor and find and display all matches in that editor.
 void matchFound(EditorPane editor, int line, int column, int length, java.lang.String searchText, java.lang.String matchLine)
          Implementation of the SearchResultsListener interface
 void messageAction(Browser browser)
          Called when this message is activated in the MessageView.
 
Methods inherited from class com.borland.primetime.ide.Message
getBackground, getCellRenderer, getContextAction, getFont, getForeground, getHelpAction, getIcon, getMessageAction, getSelectAction, getText, getToolTipText, isLazyFetchChildren, selectAction, setBackground, setCellRenderer, setContextAction, setFont, setForeground, setHelpAction, setIcon, setLazyFetchChildren, setMessageAction, setSelectAction, setText, setToolTipText, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchManager.SearchPathResultMessage

public SearchManager.SearchPathResultMessage(Project project,
                                             MessageView mv,
                                             Url path,
                                             SearchOptions opts)
Create a new object. Among other things, the local context menu of the message view is modified to reflect the fact that we are searching.
Parameters:
project - The current project.
mv - The messageView that holds the messages.
path - The path that is being searched.
opts - The search options used.
Method Detail

messageAction

public void messageAction(Browser browser)
Called when this message is activated in the MessageView.
Overrides:
messageAction in class Message
Parameters:
browser - The browser that holds the editor we want to show.

fetchChildren

public void fetchChildren(Browser browser)
Load the node where matches were found in an editor and find and display all matches in that editor.
Overrides:
fetchChildren in class Message
Parameters:
browser - The browser that holds the editor we want to show.

matchFound

public void matchFound(EditorPane editor,
                       int line,
                       int column,
                       int length,
                       java.lang.String searchText,
                       java.lang.String matchLine)
Implementation of the SearchResultsListener interface
Specified by:
matchFound in interface SearchResultsListener
Parameters:
editor - The editor containing the match.
line - The line on which the start of the match was found.
column - The column on which the start of the match was found.
length - The length of the match (important for regular expressions).
searchText - The text that was searched for.
matchLine - The line containing the start of the text which was matched.