Search code examples
smalltalksqueak

How do I perform a text search of a Squeak 3.7 image?


I have an image that runs on the 3.7 version of Squeak - I'd like to do a text search for strings and fragments of strings, over all classes, categories and selectors in the image. Is there a built in tool I can use for doing this sort of thing?


Solution

  • "method source containing it" (mentioned by Alexandre Jasmin) will include class comments, strings, selectors, and method source.

    If the string might be contained in a method protocol name, I think you'd have to check programmatically. Something like:

    Smalltalk allClasses select: [ :c |
        c organization categories anySatisfy: [: cat |
            '*substring*' match: cat ] ].