{
if (scopes != null)
{
for (IASScope iasScope : scopes)
{
IFileScope scope = (IFileScope)iasScope;
if (scope != null)
{
final Collection<IASScope> compilationUnitScopeList = compilationUnitToScopeList.getUnchecked(cu);
assert compilationUnitScopeList != null;
compilationUnitScopeList.add(scope);
ArrayList<IDefinition> externallVisibleDefs = new ArrayList<IDefinition>();
scope.collectExternallyVisibleDefinitions(externallVisibleDefs, false);
for (IDefinition d : externallVisibleDefs)
addDefinition(d);
}
}
}