private static void addDependents(Source source,
Set<QName> dependents,
Map<QName, Source> qNameToSourceMap,
Map<Name, Map<String, Source>> dependentMap)
{
CompilationUnit compilationUnit = source.getCompilationUnit();
if (compilationUnit != null)
{
for (QName topLevelDefinition : compilationUnit.topLevelDefinitions)
{
Map<String, Source> topLevelDefinitionDependents = dependentMap.get(topLevelDefinition);
if (topLevelDefinitionDependents != null)
{
for (Source dependentSource : topLevelDefinitionDependents.values())
{
boolean foundNewDependent = false;
CompilationUnit dependentCompilationUnit = dependentSource.getCompilationUnit();
if (dependentCompilationUnit != null)
{
for (QName dependent : dependentCompilationUnit.topLevelDefinitions)
{