private void processSources(List<Source> sources, TreeSet<String> sourceNames, TreeSet<String> assetNames,
TreeSet<String> libraryNames, Map<String, Data> data, Map<String, String> locations)
{
for (Source s : sources)
{
CompilationUnit u = (s == null) ? null : s.getCompilationUnit();
if (s == null)
{
continue;
}
if (s.isFileSpecOwner() || s.isSourceListOwner() || s.isSourcePathOwner() || s.isResourceBundlePathOwner())
{
sourceNames.add(s.getName());
for (Iterator j = s.getFileIncludes(); j.hasNext(); )
{
VirtualFile f = (VirtualFile) j.next();
sourceNames.add(f.getName());
}
if (u.hasAssets())
{
for (Iterator j = u.getAssets().iterator(); j.hasNext(); )
{
Map.Entry e = (Map.Entry) j.next();
AssetInfo assetInfo = (AssetInfo) e.getValue();
VirtualFile path = assetInfo.getPath();
if (path != null)
{
assetNames.add(assetInfo.getPath().getName());
}
}
}
if (locations != null)
{
for (int j = 0, size = u.topLevelDefinitions.size(); j < size; j++)
{
locations.put(u.topLevelDefinitions.get(j).toString(), s.getName());
}
}
}
else if (s.isSwcScriptOwner())
{
String location = ((SwcScript) s.getOwner()).getLibrary().getSwcLocation();
libraryNames.add(location);
if (locations != null)
{
for (int j = 0, size = u.topLevelDefinitions.size(); j < size; j++)
{
locations.put(u.topLevelDefinitions.get(j).toString(), location);
}
}
}
}
for (Source s : sources)
{
CompilationUnit u = (s == null) ? null : s.getCompilationUnit();
if (s == null)
{
continue;
}