{
Source s = def2source.get( namespaceURI, localPart );
if (s == null)
{
SwcScript script = def2script.get( namespaceURI, localPart );
if (script != null)
{
s = createSource(script);
if (s != null)
{
Iterator<String> iterator = script.getDefinitionIterator();
while (iterator.hasNext())
{
def2source.put(new QName(iterator.next()), s);
}
name2source.put(s.getName(), s);
CompilationUnit cachedCompilationUnit = script.getCompilationUnit();
if ((cachedCompilationUnit != null) && (s.isInternal() || cachedCompilationUnit.hasTypeInfo))
{
Source.copyCompilationUnit(cachedCompilationUnit, s.getCompilationUnit(), false);
}
if (cacheSwcCompilationUnits)
{
script.setCompilationUnit(s.getCompilationUnit());
}
}
}
}