# HG changeset patch # User Claus Gittinger # Date 1526036967 -7200 # Node ID beb48f66edf14d32cfb4d858968986828ea2f6fb # Parent 8cf42e7015f549897faa6d63a8c557a8b7ff1fc9 #FEATURE by cg class: Workspace added: #browseMethodsContainingInName #browseMethodsContainingInName: #browseMethodsContainingItInName changed: #editMenu diff -r 8cf42e7015f5 -r beb48f66edf1 Workspace.st --- a/Workspace.st Thu May 10 21:06:39 2018 +0200 +++ b/Workspace.st Fri May 11 13:09:27 2018 +0200 @@ -1848,6 +1848,29 @@ "Modified: / 26.9.2001 / 17:38:06 / cg" ! +browseMethodsContainingInName + "ask for a piece of text and + open a browser on all methods where that piece is contained in the selector" + + |pieceOfText| + + pieceOfText := Dialog request:'Browse methods containing in name:'. + pieceOfText isEmptyOrNil ifTrue:[^ self]. + + self browseMethodsContainingInName:pieceOfText +! + +browseMethodsContainingInName:pieceOfText + "open a browser on all methods where that piece is contained in the selector" + + (SystemBrowser default + browseMethodsForWhich:[:m | + (m selector ? '') includesString:pieceOfText caseSensitive:false + ] + title:('Methods with "%1" in name' bindWith:pieceOfText) + ) autoSearch:pieceOfText ignoreCase:true +! + browseMethodsContainingInSource "ask for a piece of text and open a browser on all methods where that piece is contained in the source" @@ -1871,6 +1894,20 @@ ) autoSearch:pieceOfText ignoreCase:true ! +browseMethodsContainingItInName + "open a browser on all methods where the selected text is part of the selector" + + |selectedText| + + selectedText := self selectedTextOrSyntaxElement. + selectedText notEmptyOrNil ifTrue:[ + selectedText := selectedText withoutSeparators. + selectedText notEmpty ifTrue:[ + self browseMethodsContainingInName:selectedText. + ] + ]. +! + browseMethodsContainingItInSource "open a browser on all methods where the selected text is contained in the source" @@ -2068,6 +2105,7 @@ ('Implementors of It' browseImplementorsOfIt ImplementorsOfIt ) ('References to It' browseReferencesToIt ) ('Classes Containing It in Name' browseClassesContainingItInName ) + ('Methods Containing It in Name' browseMethodsContainingItInName ) ('Methods Containing It in Source' browseMethodsContainingItInSource ) ('-' ) ('TimeIt' timeIt ) @@ -2083,7 +2121,8 @@ ('Senders of...' browseSendersOf ) ('Implementors of...' browseImplementorsOf ImplementorsOf ) ('References to...' browseReferencesTo ) - ('Classes Containing in Name...' browseClassesContainingInName ) + ('Classes Containing in Name...' browseClassesContainingInName ) + ('Methods Containing in Name...' browseMethodsContainingInName ) ('Methods Containing in Source...' browseMethodsWithString ) ('-' ) ('TimeIt' timeIt )