/** ***************************************************************************** */ private void loadFiles(String pfx, File dir, boolean reload) { File[] fls = dir.listFiles(new SourceFilter()); if (fls != null) { for (File f : fls) { if (f.isDirectory()) { String nm = f.getName(); String opfx = pfx; if (pfx == null) pfx = nm; else pfx += "." + nm; loadFiles(pfx, f, reload); pfx = opfx; } else { String mnm = f.getName(); int idx = mnm.lastIndexOf("."); if (idx >= 0) mnm = mnm.substring(0, idx); if (pfx != null) mnm = pfx + "." + mnm; IFileData fd = PybaseFileManager.getFileManager().getNewFileData(f, mnm, this); ISemanticData isd = parse_data.get(fd); if (reload) { // fd.reload(); isd = null; } all_files.add(fd); if (isd == null) { ISemanticData sd = parseFile(fd); if (sd != null) { System.err.println("PYBASE: PARSE YIELDS: " + sd.getRootNode()); IvyXmlWriter xw = PybaseMain.getPybaseMain().beginMessage("FILEERROR"); xw.field("PROJECT", sd.getProject().getName()); xw.field("FILE", fd.getFile().getPath()); xw.begin("MESSAGES"); for (PybaseMessage m : sd.getMessages()) { try { System.err.println("PYBASE: PARSE ERROR: " + m); PybaseUtil.outputProblem(m, sd, xw); } catch (Throwable t) { PybaseMain.logE("Pybase error message: ", t); } } xw.end("MESSAGES"); PybaseMain.getPybaseMain().finishMessage(xw); } } } } } }