Created
April 30, 2009 07:55
-
-
Save rapha/104332 to your computer and use it in GitHub Desktop.
Visualise the class hierarchy in a Java project with this script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=$1 | |
FORMAT=${2:-'pdf'} | |
FILENAME="hierarchy.$FORMAT" | |
cat \ | |
<(echo 'digraph types {') \ | |
<(ack '(class|interface) \w+ (extends|implements) \w+' --java -h -o $DIR | \ | |
awk '{print "\"" $4 "\"", "->", "\"" $2 "\""}') \ | |
<(echo '}') \ | |
| dot -T$FORMAT >$FILENAME && open $FILENAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment