boolean (Editor editor, SearchResults.Direction forwardOrBackward) { EditorSearchSession search = EditorSearchSession.get(editor); if (search != null && search.hasMatches()) { if (!search.isSearchInProgress()) { if (forwardOrBackward == SearchResults.Direction.UP) { search.searchBackward(); } else { search.searchForward(); } } return true; } return false; }