void () { Editor editor = findLeftEditor(); if (editor == null) return; String filter = mySearchTextArea.getTextArea().getText(); EditorSearchSession session = EditorSearchSession.get(editor); if (StringUtil.isEmpty(filter)) { if (session != null) { boolean focused = mySearchTextArea.getTextArea().isFocusOwner(); session.close(); if (focused) { IdeFocusManager.getInstance(myProject).requestFocus(mySearchTextArea.getTextArea(), false); } } return; } if (session == null) { session = EditorSearchSession.start(editor, myProject); session.searchForward(); } session.setTextInField(filter); }