Hello,
is there an easy way to find a string in a method starting from a class or better in a package or bundle? Not references or senders of something. Holger -- Holger Diedert Debeka Hauptverwaltung Abteilung IE/V Ferdinand-Sauerbruch-Str. 18 56058 Koblenz Telefon (0261) 498-1275 Telefax (0261) 498-2599 E-Mail [hidden email] Internet www.debeka.de |
In the browser, select 'Find' -> 'Methods with Strings Matching...'. Be
sure to use wildcards if you only enter part of the string: *click* -> 'please click the button to continue' -> 'click to continue' click* -> 'click to continue' But the scope of that search is the whole system. To limit the scope to a package or a class, spawn a browser only on that package or class by selecting 'Spawn' from the popup menu on the package or class pane, then perform the find in the spawned browser. Dave Diedert, Holger wrote: > Hello, > > is there an easy way to find a string in a method starting from a class or > better in a package or bundle? Not references or senders of something. > > Holger > > > -- > Holger Diedert > > Debeka Hauptverwaltung > Abteilung IE/V > Ferdinand-Sauerbruch-Str. 18 > 56058 Koblenz > > Telefon (0261) 498-1275 > Telefax (0261) 498-2599 > > E-Mail [hidden email] > Internet www.debeka.de > > |
In reply to this post by Diedert, Holger
Alternatively, you could load RBRegexExtensions, in which case your browser
selection acts as a context for a search, just as it does in Rewrite Editor and Code Critic. Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: Dave Stevenson [mailto:[hidden email]] Sent: Friday, April 21, 2006 8:51 AM To: Diedert, Holger Cc: [hidden email] Subject: Re: Find a string in a method In the browser, select 'Find' -> 'Methods with Strings Matching...'. Be sure to use wildcards if you only enter part of the string: *click* -> 'please click the button to continue' -> 'click to continue' click* -> 'click to continue' But the scope of that search is the whole system. To limit the scope to a package or a class, spawn a browser only on that package or class by selecting 'Spawn' from the popup menu on the package or class pane, then perform the find in the spawned browser. Dave Diedert, Holger wrote: > Hello, > > is there an easy way to find a string in a method starting from a class or > better in a package or bundle? Not references or senders of something. > > Holger > > > -- > Holger Diedert > > Debeka Hauptverwaltung > Abteilung IE/V > Ferdinand-Sauerbruch-Str. 18 > 56058 Koblenz > > Telefon (0261) 498-1275 > Telefax (0261) 498-2599 > > E-Mail [hidden email] > Internet www.debeka.de > > smime.p7s (4K) Download Attachment |
In reply to this post by Diedert, Holger
"Find > Methods with Strings Matching..." only show methods where a
single literal or message name keyword matches the string you enter. If you want to search the source of each method as one big string, e.g. for "ifAbsent: []", select a class and from its popup menu choose Query > Browse Methods with Source Matching... Much more useful in my opinion, and a shame that it only works for a single class, not say a package or bundle. For searches over all methods, not just those in a given class, you can also look at the examples in the VisualWorks Launcher > Help > System Workspace, e.g. MethodCollector new browseAllSelect: [:method | '*ifAbsent: []*' match: method getSource]. (BTW, does anyone know how to restrict a MethodCollector search to a Package? I can only see #parcel:, and getting from a CompiledMethod to its package escaped me when I tried last.) Of course you can also use the Rewrite tab's Search button to search for code structures, if that's more relevant than actual source code characters, e.g. `a == nil and press Search... This will search the selected package/class/bundle for anything matching that structure, where "a" is a single variable: foo == nil. If you want to include things where "a" is the result of a message send, e.g. self bar == nil, use: `@a == nil HTH, Steve > -----Original Message----- > From: Diedert, Holger [mailto:[hidden email]] > Sent: 21 April 2006 18:26 > To: [hidden email] > Subject: Find a string in a method > > Hello, > > is there an easy way to find a string in a method starting from a class or > better in a package or bundle? Not references or senders of something. > > Holger > > > -- > Holger Diedert > > Debeka Hauptverwaltung > Abteilung IE/V > Ferdinand-Sauerbruch-Str. 18 > 56058 Koblenz > > Telefon (0261) 498-1275 > Telefax (0261) 498-2599 > > E-Mail [hidden email] > Internet www.debeka.de |
In reply to this post by Diedert, Holger
You could get RBSourceCodeSearch
(http://www.cincomsmalltalk.com/publicRepository/RBSourceCodeSearch.html) from Public Store Repository (http://www.cincomsmalltalk.com/CincomSmalltalkWiki/PostgreSQL+Access+Page). It operates like RBRegexExtensions. Its only advantage is a tick box that allows ignoring case. Ignoring case, however can also be done in Regex. The following expression should match "Small", whatever combination of case is used: [Ss][Mm][Aa][Ll][Ll] A nice improvement for RBRegexExtensions would be to have a popup menu item to transform a search string into being case non-sensitive like this. Runar Jordahl |
In reply to this post by Diedert, Holger
Here's RBRegexExtensions with a checkbox to turn on case insensitive
searches, I can't find my public repository login to publish this, but I've been using it for a few months now, seems to work just fine ;) Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: Runar Jordahl [mailto:[hidden email]] Sent: Friday, April 21, 2006 12:02 PM To: Diedert, Holger Cc: [hidden email] Subject: Re: Find a string in a method You could get RBSourceCodeSearch (http://www.cincomsmalltalk.com/publicRepository/RBSourceCodeSearch.html) from Public Store Repository (http://www.cincomsmalltalk.com/CincomSmalltalkWiki/PostgreSQL+Access+Page). It operates like RBRegexExtensions. Its only advantage is a tick box that allows ignoring case. Ignoring case, however can also be done in Regex. The following expression should match "Small", whatever combination of case is used: [Ss][Mm][Aa][Ll][Ll] A nice improvement for RBRegexExtensions would be to have a popup menu item to transform a search string into being case non-sensitive like this. Runar Jordahl |
Free forum by Nabble | Edit this page |