public class EditorSearchSession extends java.lang.Object implements SearchSession, DataProvider, SelectionListener, SearchResults.SearchResultsListener, SearchReplaceComponent.Listener
Modifier and Type | Field and Description |
---|---|
static DataKey<EditorSearchSession> |
SESSION_KEY |
INCORRECT_REGEX_MESSAGE, KEY
Constructor and Description |
---|
EditorSearchSession(Editor editor,
Project project) |
EditorSearchSession(Editor editor,
Project project,
FindModel findModel) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
updateFinished
public static final DataKey<EditorSearchSession> SESSION_KEY
protected AnAction[] createPrimarySearchActions()
protected AnAction[] createSecondarySearchActions()
public Editor getEditor()
public static EditorSearchSession get(Editor editor)
public static EditorSearchSession start(Editor editor, Project project)
public static EditorSearchSession start(Editor editor, FindModel findModel, Project project)
public SearchReplaceComponent getComponent()
getComponent
in interface SearchSession
public Project getProject()
public java.lang.Object getData(java.lang.String dataId)
DataProvider
PlatformDataKeys
class.getData
in interface DataProvider
dataId
- the data identifier for which the value is requested.public void searchResultsUpdated(SearchResults sr)
searchResultsUpdated
in interface SearchResults.SearchResultsListener
public void cursorMoved()
cursorMoved
in interface SearchResults.SearchResultsListener
public void searchFieldDocumentChanged()
searchFieldDocumentChanged
in interface SearchReplaceComponent.Listener
public void replaceFieldDocumentChanged()
replaceFieldDocumentChanged
in interface SearchReplaceComponent.Listener
public void multilineStateChanged()
multilineStateChanged
in interface SearchReplaceComponent.Listener
public FindModel getFindModel()
getFindModel
in interface SearchSession
public boolean hasMatches()
hasMatches
in interface SearchSession
public boolean isSearchInProgress()
isSearchInProgress
in interface SearchSession
public void searchForward()
searchForward
in interface SearchSession
public void searchBackward()
searchBackward
in interface SearchSession
public void addTextToRecent(javax.swing.text.JTextComponent textField)
public void selectionChanged(SelectionEvent e)
SelectionListener
selectionChanged
in interface SelectionListener
e
- the event containing information about the change.public void beforeSelectionUpdate()
beforeSelectionUpdate
in interface SearchResults.SearchResultsListener
public void afterSelectionUpdate()
afterSelectionUpdate
in interface SearchResults.SearchResultsListener
public void close()
close
in interface SearchSession
public java.lang.String getTextInField()
public void setTextInField(java.lang.String text)
public void selectAllOccurrences()
public void removeOccurrence()
public void addNextOccurrence()
public void clearUndoInTextFields()