public static void initStringToFindWithSelection(FindModel findModel, @Nullable Editor editor) {
    if (editor != null) {
      String s = getSelectedText(editor);
      if (s != null && s.length() < 10000) {
        if (findModel.isRegularExpressions() && Registry.is("ide.find.escape.selected.text.for.regex")) {
          findModel.setStringToFind(StringUtil.escapeToRegexp(s));
        } else {
          FindModel.initStringToFind(findModel, s);
        }
      }
    }
  }
public static void initStringToFindWithSelection(FindModel findModel, @Nullable Editor editor)