<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Aptos",sans-serif;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
        {mso-style-priority:99;
        mso-style-link:"Header Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Aptos",sans-serif;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
        {mso-style-priority:99;
        mso-style-link:"Footer Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
span.HeaderChar
        {mso-style-name:"Header Char";
        mso-style-priority:99;
        mso-style-link:Header;
        font-family:"Aptos",sans-serif;}
span.FooterChar
        {mso-style-name:"Footer Char";
        mso-style-priority:99;
        mso-style-link:Footer;
        font-family:"Aptos",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
/* Page Definitions */
@page
        {mso-endnote-separator:url("cid:header.htm\@01DB5A98.5C5E3BD0") es;
        mso-endnote-continuation-separator:url("cid:header.htm\@01DB5A98.5C5E3BD0") ecs;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;
        mso-footer:url("cid:header.htm\@01DB5A98.5C5E3BD0") f1;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="2" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt">Hi Hilaire,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">I tried to just add the scope part. I really don’t use the modifier keys. That logic was all brought over from the original code. Maybe we need to grab their state before displaying the scope prompt? Btw,
 I’d ultimately like to see this be an integrated dialog that has the search text and the scope in one place. It could also then show checkboxes in place of the modifier keys to make it more intuitive / intuitable.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Jon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Cuis-dev <cuis-dev-bounces@lists.cuis.st> on behalf of Hilaire Fernandes via Cuis-dev <cuis-dev@lists.cuis.st><br>
<b>Date: </b>Sunday, December 29, 2024 at 5:32</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"> </span><span style="font-size:12.0pt;color:black">AM<br>
<b>To: </b>cuis-dev@lists.cuis.st <cuis-dev@lists.cuis.st><br>
<b>Cc: </b>Hilaire Fernandes <hfern@free.fr><br>
<b>Subject: </b>Re: [Cuis-dev] Find with Scope<o:p></o:p></span></p>
</div>
<p><span style="font-size:13.5pt">This is useful, thanks. </span>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.<o:p></o:p></p>
<pre>browseMethodsWithSourceString: aString<o:p></o:p></pre>
<pre>scopeClass: scopeClass<o:p></o:p></pre>
<pre>includeSubclasses: includeSubclasses<o:p></o:p></pre>
<pre>includeSuperclasses: includeSuperclasses<o:p></o:p></pre>
<pre>    "Smalltalk browseMethodsWithSourceString: 'SourceString' "<o:p></o:p></pre>
<pre>    "Launch a browser on all methods whose source code contains aString as a substring."<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>    | caseSensitive suffix selectString |<o:p></o:p></pre>
<pre>    Sensor controlKeyPressed ifTrue: [<o:p></o:p></pre>
<pre>        selectString := ((aString findTokens: '*') sorted: [ :a :b | a size > b size ]) first.<o:p></o:p></pre>
<pre>        ^ self <o:p></o:p></pre>
<pre>            browseMessageList: (self allMethodsSourceStringMatching: '*', aString, '*')<o:p></o:p></pre>
<pre>            name: 'Methods matched by ' , aString printString , ' (no ctrl for exact match)'<o:p></o:p></pre>
<pre>            autoHighlight: selectString<o:p></o:p></pre>
<pre>            allOccurrences: true<o:p></o:p></pre>
<pre>        ].<o:p></o:p></pre>
<pre>   <b> suffix := (caseSensitive := Sensor shiftPressed)<o:p></o:p></b></pre>
<pre><b>        ifTrue: [' (case-sensitive. Use ctrl for $* pattern match.)']<o:p></o:p></b></pre>
<pre><b>        ifFalse: [' (shift for case-sensitive. ctrl for $* pattern match.)'].</b><o:p></o:p></pre>
<pre>    ^ self <o:p></o:p></pre>
<pre>        browseMessageList: (self allMethodsWithSourceString: aString matchCase: caseSensitive scopeClass: scopeClass includeSubclasses: includeSubclasses includeSuperclasses: includeSuperclasses)<o:p></o:p></pre>
<pre>        name: 'Methods containing ' , aString printString , suffix<o:p></o:p></pre>
<pre>        autoHighlight: aString<o:p></o:p></pre>
<pre>        allOccurrences: true.<o:p></o:p></pre>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">Le 25/11/2024 à 19:47, Juan Vuletich via Cuis-dev a écrit :<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:12.0pt"><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.
<o:p></o:p></span></p>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://mamot.fr/@drgeo">http://mamot.fr/@drgeo</a><o:p></o:p></pre>
</div>
</div>
</div>
</div>
</body>
</html>