public SourceIndex getSourceIndex( CompilationUnit sourceTree, String source )
{
// build the source index
SourceIndex index = new SourceIndex( source );
sourceTree.acceptVisitor( new SourceIndexVisitor(), index );
// DEBUG
//sourceTree.acceptVisitor( new TreeDumpVisitor( new File( "tree.txt" ) ), null );
// resolve all the classes in the source references