}
private ClassPath[] findClassPathOrNull(FileObject file, String type, Library lib) {
if (lib.getType().equals(J2SELibraryTypeProvider.LIBRARY_TYPE)) {
List<URL> resources = lib.getContent(J2SELibraryTypeProvider.VOLUME_TYPE_SRC);
ClassPath sourcePath = ClassPathSupport.createClassPath(resources.toArray(new URL[resources.size()]));
FileObject root = sourcePath.findOwnerRoot(file);
if (root != null) {
setLastUsedLibrary(root, lib);
if (ClassPath.SOURCE.equals(type)) {
return new ClassPath[] {sourcePath};
} else if (ClassPath.COMPILE.equals(type)) {