private void doSearch ( ) { setSearchPanelVisible ( true ) ; String selectedText = textComponent . getSelectedText ( ) ; if ( selectedText != null ) { searchPanel . setQuery ( selectedText ) ; } searchPanel . requestFocusForTextField ( ) ; }
Called to initiate the search . Will show the search panel and set the currently selected text as the query