protected void resolveSourcePathEntry(ILoader loader, boolean includeSource, boolean cpeFromMainProject, IPath p, IPath o, IPath[] excludePaths, String fileExtension) { if (includeSource) { List<Module> s = MapUtil.findOrCreateList(modules, loader); s.add(new EclipseSourceDirectoryTreeModule(p, excludePaths, fileExtension)); } else if (o != null) { File output = makeAbsolute(o).toFile(); List<Module> s = MapUtil.findOrCreateList(modules, cpeFromMainProject ? Loader.APPLICATION : loader); s.add(new BinaryDirectoryTreeModule(output)); } }
} else if (m instanceof BinaryDirectoryTreeModule) { moduleType = "binaryDir"; modulePath = ((BinaryDirectoryTreeModule) m).getPath(); } else if (m instanceof SourceDirectoryTreeModule) { moduleType = "sourceDir";
} else if (m instanceof BinaryDirectoryTreeModule) { moduleType = "binaryDir"; modulePath = ((BinaryDirectoryTreeModule) m).getPath(); } else if (m instanceof SourceDirectoryTreeModule) { moduleType = "sourceDir";
protected void resolveLibraryPathEntry(ILoader loader, IPath p) { File file = makeAbsolute(p).toFile(); JarFile j; try { j = new JarFile(file); } catch (ZipException z) { // a corrupted file. ignore it. return; } catch (IOException z) { // should ignore directories as well.. return; } if (isPrimordialJarFile()) { List<Module> s = MapUtil.findOrCreateList(modules, loader); s.add(file.isDirectory() ? (Module) new BinaryDirectoryTreeModule(file) : (Module) new JarFileModule(j)); } }
File f = new File(path); if (f.isDirectory()) { scope.addToScope(loader, new BinaryDirectoryTreeModule(f)); } else { scope.addClassFileToScope(loader, f);
File f = new File(path); if (f.isDirectory()) { scope.addToScope(loader, new BinaryDirectoryTreeModule(f)); } else { scope.addClassFileToScope(loader, f);
scope.addToScope(loader, new BinaryDirectoryTreeModule( f)); } else { // handle java class file.
scope.addToScope(loader, new BinaryDirectoryTreeModule( f)); } else { // handle java class file.
@Override protected void resolveProjectClasspathEntries(IJavaProject project, boolean includeSource) { try { resolveClasspathEntries(project, Arrays.asList(project.getRawClasspath()), Loader.EXTENSION, includeSource, true); File output = makeAbsolute(project.getOutputLocation()).toFile(); if (!includeSource) { if (output.exists()) { List<Module> s = MapUtil.findOrCreateList(modules, Loader.APPLICATION); s.add(new BinaryDirectoryTreeModule(output)); } } } catch (JavaModelException e) { e.printStackTrace(); Assertions.UNREACHABLE(); } } }
File bd = fp.getFile(entryPathname, javaLoader); assert bd.isDirectory(); scope.addToScope(walaLoader, new BinaryDirectoryTreeModule(bd)); } else if ("sourceDir".equals(entryType)) { File sd = fp.getFile(entryPathname, javaLoader);
File bd = fp.getFile(entryPathname, javaLoader); assert bd.isDirectory(); scope.addToScope(walaLoader, new BinaryDirectoryTreeModule(bd)); } else if ("sourceDir".equals(entryType)) { File sd = fp.getFile(entryPathname, javaLoader);