From: wsdng@... (=?ISO-8859-1?Q?Sascha_D=F6rdelmann?=) Date: 2003-08-08T02:06:23+09:00 Subject: Re: newbie question from a smalltalker Ben Giddings wrote in message news:<200308061159.53695.ben@thingmagic.com>... > On Wed August 6 2003 11:02 am, Robert Klemme wrote: > > Yep, apart from the fact that you won't find the senders - which is a > > quite important thing to know. The closes you can get is a script that > > wades through the sources and prints out all occurrences of " > identifier>."; you would only miss those cases where some > > instance invokes the method on itself - but these are easy to find anyway. > > > > Other than that it'll be difficult because of the dynamic typing of the > > language. You can't determine from "foo.size()" whether it's the size > > method of class Array or String - which is a bit of a difference. > > For what it's worth, I think a tool that could do what Adriano's asking for > would be incredibly useful, if only as a learning tool. Years and years ago, > when I was first learning Java, I had a copy of the first edition of Java in > a Nutshell. One of the best features of the book were some indices at the > back that listed (in dead-tree format) exactly this sort of information. If > I remember correctly, they might have even had an index of where certain > classes were used as function parameters. > > What made this great as a learning tool was that you could easily find > examples of how a certain function was used, or quickly find all the > different IO classes that could do what you were trying to do. > > Sometime I'll have to get around to playing with Smalltalk and see how it > works there. If you do so, have a look at the RefactoringBrowser, Smalllint and the RewriteTool: http://st-www.cs.uiuc.edu/~brant/Refactory/Rewrite/index.htm You'll notice that these tools do a lot more than simply find senders or implementors. They find some kind of parse tree patterns and allow advanced analysis and replacement based on these patterns. Cheers Sascha