void () { if (mySearchResults.getCursor() != null) { try { addTextToRecent(myComponent.getSearchTextComponent()); addTextToRecent(myComponent.getReplaceTextComponent()); myLivePreviewController.performReplace(); } catch (FindManager.MalformedReplacementStringException e) { Messages.showErrorDialog(myComponent, e.getMessage(), FindBundle.message("find.replace.invalid.replacement.string.title")); } } }