开发者

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

开发者 https://www.devze.com 2023-01-30 08:32 出处:网络
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 i

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 开发者_如何学Cthing?


"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 ] ].


  1. Select the text that you want to search for (generally from a browser or workspace).
  2. Shift-Yellow Click on the text to show up a context menu.


That menu will contains among other things some advanced search options for the selected text string:

  • selectors containing it
  • method strings with it
  • method source with it
  • class names containing it
  • class comments with it
  • change sets with it
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号