Ejemplo n.º 1
0
 /**
  * Performs a search.
  *
  * @param sc search context
  * @param jump jump to next hit
  */
 final void search(final SearchContext sc, final boolean jump) {
   try {
     rend.search(sc);
     if (!sc.search.isEmpty()) gui.status.setText(Util.info(Text.STRINGS_FOUND_X, sc.nr()));
     if (jump) jump(SearchDir.CURRENT, false);
   } catch (final Exception ex) {
     final String msg = Util.message(ex).replaceAll(Prop.NL + ".*", "");
     gui.status.setError(Text.REGULAR_EXPR + Text.COLS + msg);
   }
 }
 private static SearchContext createSearchContext() {
   AnActionEvent event =
       new AnActionEvent(
           null,
           DataManager.getInstance().getDataContext(),
           "",
           new DefaultActionGroup().getTemplatePresentation(),
           ActionManager.getInstance(),
           0);
   return SearchContext.buildFromDataContext(event.getDataContext());
 }