@@ -407,11 +407,11 @@ else if (_searchSelectionOnly) {
407407 * _selectionRegion and _isForward. Ignores value of _searchAllDocuments. Processes selected region (which may be
408408 * the whole document) sequentially depending on find direction. This convention ensures that matches created by
409409 * string replacement will not be replaced as in the following example:<p>
410- * findString: "hello "<br>
411- * replaceString: "e "<br>
410+ * findString: "e "<br>
411+ * replaceString: "hello "<br>
412412 * document text: "hhellollo"<p>
413413 * Only executes in event thread. Assumes (i) this has exclusive access to _doc (since it only runs in event thread)
414- * and (ii) findAction does not modify _doc.
414+ * and (ii) findAction does not modify _doc (What about replacement?)
415415 * @param findAction action to perform on the occurrences; input is the FindResult, output is ignored
416416 * @return the number of replacements
417417 */
@@ -488,24 +488,21 @@ private FindResult findNext(boolean searchAll) {
488488 }
489489
490490
491- /** Finds next match in specified doc only. If searching forward, len must
492- * be doc.getLength(). If searching backward, start must be 0. If
493- * searchAll, suppress executing in-document wrapped search, because it
494- * must be deferred. Only runs in the event thread. Note than this method
495- * does a wrapped search if specified search fails.
496- * @param doc the document to search in
497- * @param start the start offset for searching
498- * @param len the length to search
499- * @param searchAll flao
500- * @return the next match in the specified document
501- */
491+ /** Finds next match in specified doc only. If searching forward, len must be doc.getLength(). If searching
492+ * backward, start must be 0. If searchAll, suppress executing in-document wrapped search, because it must be
493+ * deferred. Only runs in the event thread. Note than this method does a wrapped search if specified search fails.
494+ * @param doc the document to search in
495+ * @param start the start offset for searching
496+ * @param len the length to search
497+ * @param searchAll flao
498+ * @return the next match in the specified document
499+ */
502500 private FindResult _findNextInDoc (OpenDefinitionsDocument doc , int start , int len , boolean searchAll ) {
503501
504502 assert EventQueue .isDispatchThread () || Utilities .TEST_MODE ;
505503
506504 // search from current position to "end" of document ("end" is start if searching backward)
507- // Utilities.show("_findNextInDoc([" + doc.getText() + "], " + start + ", " + len + ", " + searchAll + ")");
508- // _log.log("_findNextInDoc([" + doc.getText() + "], " + start + ", " + len + ", " + searchAll + ")");
505+ _log .log ("_findNextInDoc([" + doc .getText () + "], " + start + ", " + len + ", " + searchAll + ")" );
509506 FindResult fr = _findNextInDocSegment (doc , start , len );
510507 if (fr .getFoundOffset () >= 0 || searchAll ) return fr ;
511508
0 commit comments