MCPcopy Create free account
hub / github.com/BaseXdb/basex / refresh

Method refresh

basex-core/src/main/java/org/basex/gui/text/SearchBar.java:279–285  ·  view source on GitHub ↗

Refreshes the panel after a successful search operation. @param sc search context @param jump jump to next search result

(final SearchContext sc, final boolean jump)

Source from the content-addressed store, hash-verified

277 * @param jump jump to next search result
278 */
279 void refresh(final SearchContext sc, final boolean jump) {
280 final boolean hits = sc.nr != 0, empty = sc.string.isEmpty();
281 rplc.setEnabled(hits && !empty);
282 find.highlight(hits || empty);
283 if(isVisible()) gui.status.setText(Util.info(Text.STRINGS_FOUND_X, sc.nr()), true);
284 if(jump) editor.jump(SearchDir.CURRENT, false);
285 }
286
287 // PRIVATE METHODS ==============================================================================
288

Callers

nothing calls this directly

Calls 8

infoMethod · 0.95
highlightMethod · 0.80
nrMethod · 0.80
isVisibleMethod · 0.65
isEmptyMethod · 0.45
setEnabledMethod · 0.45
setTextMethod · 0.45
jumpMethod · 0.45

Tested by

no test coverage detected