[Cuis-dev] Find with Scope
Hilaire Fernandes
hfern at free.fr
Sun Dec 29 02:31:34 PST 2024
This is useful, thanks. 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.
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
].
*suffix := (caseSensitive := Sensor shiftPressed) ifTrue: ['
(case-sensitive. Use ctrl for $* pattern match.)'] ifFalse: ['
(shift for case-sensitive. ctrl for $* pattern match.)'].*
^ self
browseMessageList: (self allMethodsWithSourceString: aString matchCase: caseSensitive scopeClass: scopeClass includeSubclasses: includeSubclasses includeSuperclasses: includeSuperclasses)
name: 'Methods containing ' , aString printString , suffix
autoHighlight: aString
allOccurrences: true.
Le 25/11/2024 à 19:47, Juan Vuletich via Cuis-dev a écrit :
>
> 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.
>
> 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.
--
http://mamot.fr/@drgeo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241229/c8c476e7/attachment-0001.htm>
More information about the Cuis-dev
mailing list