Replaces the text. @param rc replace context
(final ReplaceContext rc)
| 391 | * @param rc replace context |
| 392 | */ |
| 393 | final void replace(final ReplaceContext rc) { |
| 394 | try { |
| 395 | final int[] select = rend.replace(rc); |
| 396 | if(rc.text != null) { |
| 397 | final boolean sel = editor.isSelected(); |
| 398 | setText(rc.text); |
| 399 | editor.select(select[0], select[sel ? 1 : 0]); |
| 400 | release(Action.CHECK); |
| 401 | } |
| 402 | gui.status.setText(Text.STRINGS_REPLACED, true); |
| 403 | } catch(final Exception ex) { |
| 404 | final String msg = Util.message(ex).replaceAll(Prop.NL + ".*", ""); |
| 405 | gui.status.setText(Text.REGULAR_EXPR + Text.COLS + msg, false); |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | /** |
| 410 | * Jumps to the current, next or previous search string. |
no test coverage detected