Finding classes by their comments

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Mon Apr 23 10:19:09 UTC 2001


On Mon, 23 Apr 2001, Richard A. O'Keefe wrote:

> I am NOT providing this in the form of a change set, because there are
> lots of things that would have to be done first, like plug it into Browsers
> somehow.

Actually, when I am looking for something like this I just type it into a
workspace.  And when the search for URI comes up empty, I replace URL for
it. And voila, 26 occurrences:

	Smalltalk allClasses select:
		[:c | c comment asString includesSubString: 'URL']

> Only two methods are required.

I virtually never have to create a new method for such stuff, it's all
there. See above.

> One of them is required because Text can't make up its mind how
> thoroughly it wants to emulate String.

RTFC before making such bold comments. There are only very few methods
just forwarding the method to the embedded string. I counted 3 out of 49:
two variants of #findString plus #lineCount. Compare this to the 165
methods of String.

-- Bert





More information about the Squeak-dev mailing list