<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font size="4">This is useful, thanks. </font>Some features,
      need to be documented thought (where?) when I read this method
      below. I did not find how to use the Shift or Ctrl alternatives.
      Pressing on of those prevent the search to start.<br>
    </p>
    <pre class="moz-cite-prefix">browseMethodsWithSourceString: aString
scopeClass: scopeClass
includeSubclasses: includeSubclasses
includeSuperclasses: includeSuperclasses
    "Smalltalk browseMethodsWithSourceString: 'SourceString' "
    "Launch a browser on all methods whose source code contains aString as a substring."

    | caseSensitive suffix selectString |
    Sensor controlKeyPressed ifTrue: [
        selectString := ((aString findTokens: '*') sorted: [ :a :b | a size > b size ]) first.
        ^ self 
            browseMessageList: (self allMethodsSourceStringMatching: '*', aString, '*')
            name: 'Methods matched by ' , aString printString , ' (no ctrl for exact match)'
            autoHighlight: selectString
            allOccurrences: true
        ].
   <b> suffix := (caseSensitive := Sensor shiftPressed)
        ifTrue: [' (case-sensitive. Use ctrl for $* pattern match.)']
        ifFalse: [' (shift for case-sensitive. ctrl for $* pattern match.)'].</b>
    ^ self 
        browseMessageList: (self allMethodsWithSourceString: aString matchCase: caseSensitive scopeClass: scopeClass includeSubclasses: includeSubclasses includeSuperclasses: includeSuperclasses)
        name: 'Methods containing ' , aString printString , suffix
        autoHighlight: aString
        allOccurrences: true.
</pre>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Le 25/11/2024 à 19:47, Juan Vuletich
      via Cuis-dev a écrit :<br>
    </div>
    <blockquote type="cite" cite="mid:6744C637.1070901@cuis.st"><br>
      I recently replaced the 'Method Source with it' menu option in
      Smalltalk Editors with the new 'Find with Scope' option by Jon
      Raiford. I'm sure it is more convenient and useful. Please try it
      and share your thoughts.
      <br>
      <br>
      I have also been doing other tweaks to improve usability, for
      instance 'browse package' on all four lists in the Browser, and
      minor tweaks here and there. Feedback is most welcome as usual.
      <br>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://mamot.fr/@drgeo">http://mamot.fr/@drgeo</a></pre>
  </body>
</html>