if (dependencyGraphOutput != null)
{
LinkageChecker linkageChecker = new LinkageChecker(project, getTargetSettings());
Target.RootedCompilationUnits rootedCompilationUnits = target.getRootedCompilationUnits();
problems.addAll(rootedCompilationUnits.getProblems());
GraphMLWriter dependencyGraphWriter =
new GraphMLWriter(project.getDependencyGraph(),
rootedCompilationUnits.getUnits(), true,
linkageChecker);
BufferedOutputStream graphStream = new BufferedOutputStream(new FileOutputStream(dependencyGraphOutput));
LinkedList<ICompilerProblem> problemList = new LinkedList<ICompilerProblem>();
Iterables.addAll(problemList, rootedCompilationUnits.getProblems());
dependencyGraphWriter.writeToStream(graphStream, problemList);
problems.addAll(problemList);
}
}