MCPcopy Create free account
hub / github.com/bobbylight/RText / showFindUI

Method showFindUI

src/main/java/org/fife/rtext/SearchManager.java:373–407  ·  view source on GitHub ↗

Displays the "find" UI (either a dialog or a toolbar). @see #showReplaceUI()

()

Source from the content-addressed store, hash-verified

371 * @see #showReplaceUI()
372 */
373 public void showFindUI() {
374
375 if (searchingMode==SearchingMode.DIALOGS) {
376
377 rtext.getCollapsibleSectionPanel().hideBottomComponent();
378 ensureSearchDialogsCreated();
379
380 if (replaceDialog.isVisible()) {
381 replaceDialog.setVisible(false);
382 }
383
384 if (!findDialog.isVisible()) {
385 // If the current document has selected text, use the selection
386 // as the value to search for.
387 RTextEditorPane editor = rtext.getMainView().getCurrentTextArea();
388 String selectedText = editor.getSelectedText();
389 if (selectedText!=null) {
390 findDialog.setSearchString(selectedText);
391 }
392 findDialog.setVisible(true);
393 }
394 else {
395 findDialog.requestFocus();
396 }
397
398 }
399
400 else { // SearchingMode.TOOLBARS
401 hideFindDialogIfVisible();
402 hideReplaceDialogIfVisible();
403 ensureToolbarsCreated();
404 rtext.getCollapsibleSectionPanel().showBottomComponent(findToolBar);
405 }
406
407 }
408
409
410 /**

Callers 1

actionPerformedMethod · 0.80

Calls 9

ensureToolbarsCreatedMethod · 0.95
getCurrentTextAreaMethod · 0.80
getSelectedTextMethod · 0.80
setVisibleMethod · 0.45
getMainViewMethod · 0.45

Tested by

no test coverage detected