Hiya,
Regular expressions made for this. This'll print all casts in a source tree
(Unix or Cygwin): egrep ".*= *\(.*\).*;" `find . -name "*.java"` Changing
this to a search and replace would allow you to add XML or output it as
colorized HTML or something. If your not in one of those environments, you
could do this in Perl or Emacs, or get one of the commerical regular
expression matchers that have a fancy Windows interface.

If you are a CVS man, one of the advantages of pimping out your server with
ViewCVS is that it gives you a web interface to do arbitrary regular
expressions on your source tree. Then it's very easy to answer these kinds
of questions.

Fun.


-----Original Message-----
From: William H. Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 5:03 PM
To: [EMAIL PROTECTED]
Subject: [jug-discussion] Source code labeler/annotater


I'm looking for a tool but I'm not even sure what it might be called.  What
I'd like to do, for example, is to be able to find all the places where a
cast is performed in Java source code.

What I picture is a tool that would parse source code and mark it up in
some specified way, perhaps with XML.  If I'm interested in casts, a
statement like

        y = (X)x;

might come through as

        y = <cast><type>(X)</type><expr>x</expr></cast>

Other examples: mark up method bodies, mark up locals, mark up array
initializers.

Does anybody know of anything like this?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to