public static ISourceLocation[] findLocations(IPackageFragmentRoot[] roots)
throws JavaModelException {
List l = new ArrayList();
for (int i = 0; i < roots.length; i++) {
ISourceLocation loc = findLocation(roots[i]);
if (loc != null) {
l.add(loc);
}
}
return (ISourceLocation[]) l.toArray(new ISourceLocation[l.size()]);