for(Object f : aBaseProject.getSourceFiles()){ CsmFile file = (CsmFile) f; boolean failed = fiq.hasBrokenIncludes(file);
private void dumpProjectFilesInfo(CsmProject project, PrintWriter printOut, boolean printList) { Collection<CsmFile> sourceFiles = project.getSourceFiles(); Collection<CsmFile> headerFiles = project.getHeaderFiles(); printOut.printf("%s\n", project.getDisplayName());// NOI18N
private Map<CsmFile,Set<CsmFile>> buildWhoIncludes(CsmFile file){ HashMap<CsmFile,Set<CsmFile>> aMap = new HashMap<CsmFile,Set<CsmFile>>(); for(CsmProject prj :CsmModelAccessor.getModel().projects()){ for(CsmFile f : prj.getSourceFiles()){ buildWhoIncludes(f, aMap); } for(CsmFile f : prj.getHeaderFiles()){ buildWhoIncludes(f, aMap); } for (CsmProject lib : prj.getLibraries()){ for(CsmFile f : lib.getSourceFiles()){ buildWhoIncludes(f, aMap); } for(CsmFile f : lib.getHeaderFiles()){ buildWhoIncludes(f, aMap); } } } return aMap; }
int failedDirectives = 0; int failedFiles = 0; for(Object f : aBaseProject.getSourceFiles()){ CsmFile file = (CsmFile) f; files++;
private Map<String,List<FileObject>> search(CsmOffsetable ppDirective){ CsmProject prj = ppDirective.getContainingFile().getProject(); HashSet<FileObject> set = new HashSet<FileObject>(); for (Iterator<CsmFile> it = prj.getSourceFiles().iterator(); it.hasNext();){ CsmFile file = it.next(); FileObject fo = file.getFileObject();
/*package*/ static CsmFile findSource(CsmFile header) { String name = getName(header.getAbsolutePath().toString()); Collection<CsmFile> includers = CsmIncludeHierarchyResolver.getDefault().getFiles(header); for (CsmFile f : includers) { if (CndFileUtils.areFilenamesEqual( getName(f.getAbsolutePath().toString()), name )) { // we found source file with the same name // as header and with dependency to it. Best shot. return f; } } // look for random namesake for (CsmFile f : header.getProject().getSourceFiles()) { if (CndFileUtils.areFilenamesEqual( getName(f.getAbsolutePath().toString()), name )) { return f; } } return null; }
private static CsmFile findSource(CsmFile header) { String name = getFileName(header.getAbsolutePath()); Collection<CsmFile> includers = CsmIncludeHierarchyResolver.getDefault().getFiles(header); for (CsmFile f : includers) { if (CndFileUtils.areFilenamesEqual(getFileName(f.getAbsolutePath()), name)) { // we found source file with the same name // as header and with dependency to it. Best shot. return f; } } // look for random namesake for (CsmFile f : header.getProject().getSourceFiles()) { if (CndFileUtils.areFilenamesEqual(getFileName(f.getAbsolutePath().toString()), name)) { return f; } } return null; }