0N/ASee LICENSE.txt included in this distribution for the specific
0N/Afile and include the License file at LICENSE.txt.
1473N/A if (request.getCharacterEncoding() == null) {
1473N/A request.setCharacterEncoding("UTF-8");
1473N/A cfg = PageConfig.get(request);
1473N/A Annotation annotation = cfg.getAnnotation();
1473N/A float r = annotation.getWidestRevision() * 1.15f;
1473N/A float a = annotation.getWidestAuthor() * 1.15f;
1473N/A cfg = PageConfig.get(request);
1473N/A String rev = cfg.getRequestedRevision();
1473N/A File resourceFile = cfg.getResourceFile();
1473N/A String path = cfg.getPath();
1473N/A String basename = resourceFile.getName();
1474N/A Project activeProject = Project.getProject(path);
1473N/A Set<String> projects = cfg.getRequestedProjects();
1475N/A String cookieValue = cfg.getRequestedProjectsAsString();
1473N/A cookieValue = cookieValue.length() == 0
1473N/A : activeProject.getDescription() + '/' + cookieValue;
1473N/A // TODO hmmm, projects.jspf doesn't set a path
1473N/A response.addCookie(cookie);
1474N/A Map<String, Date> modTimes = HistoryGuru.getInstance()
1474N/A .getLastModifiedTimes(new File(cfg.getSourceRootPath() + path), path2rev);
1474N/A ? new ArrayList<String>(modTimes.keySet())
1474N/A long now = System.currentTimeMillis();
1474N/A EftarFileReader.FNode parentFNode = null;
1474N/A EftarFileReader desc = cfg.getEftarReader();
1474N/A parentFNode = desc.getNode(path);
1474N/A offset = parentFNode.childOffset;
1474N/A IgnoredNames ignoredNames = cfg.getIgnoredNames();
1474N/A new SimpleDateFormat(cfg.getConfig().getDirlistDatePattern());
1474N/A boolean useToday = cfg.getConfig().isDirlistUseToday();
1474N/A if (path.length() != 0) {
1474N/A if (!modTimes.isEmpty()) {
1474N/A for (Date d : modTimes.values()) {
1474N/A lastm = resourceFile.getParentFile().lastModified();
1469N/A ? "Today" : dateFormatter.format(lastm) %></td>
1474N/A ? path2rev.size() + " entries"
1474N/A : resourceFile.getParentFile().length() + ""
1474N/A if (ignoredNames.match(file)) {
1474N/A isDir = file.endsWith("/");
1474N/A lastm = modTimes.get(file).getTime();
1474N/A size = path2rev.get(file);
1474N/A link = Util.uriEncodePath(file);
1368N/A readMes.add(file);
1474N/A isDir = child.isDirectory();
1475N/A Date lmd = modTimes.get(isDir ? file + '/' : file);
1474N/A link = Util.uriEncodePath(file);
1469N/A ? "Today" : dateFormatter.format(lastm) %></td>
1474N/A String briefDesc = desc.getChildTag(parentFNode, file); %>
1469N/A <td><%= briefDesc == null ? "" : Util.htmlize(briefDesc) %></td><%
1474N/A if (readMes.size() != 0) {
1474N/A File[] xrefs = cfg.findDataFiles(readMes);
1474N/A for (int i=0; i < xrefs.length; i++) {
1474N/A readme = new File(resourceFile, readMes.get(i));
1474N/A g = AnalyzerGuru.getGenre(in);
1474N/A IOUtils.close(in);
1474N/A if (g == Genre.IMAGE) {
1370N/A<h3><%= readMes.get(i) %></h3><%
1474N/A XrefInputStream.dump(xrefs[i], out, false);
1469N/A<img src="<%= Util.uriEncodePath(rawPath + '/' + image) %>"/><%
1473N/A } else if (rev.length() != 0) {
1473N/A String parent = resourceFile.getParent();
1473N/A if (basename.isEmpty()) {
1473N/A int idx = path.lastIndexOf('/');
1473N/A basename = path.substring(idx+1);
1473N/A FileAnalyzerFactory a = AnalyzerGuru.find(basename);
1473N/A Genre g = AnalyzerGuru.getGenre(a);
1473N/A in = HistoryGuru.getInstance()
1473N/A .getRevision(parent, basename, rev.substring(2));
1473N/A error = e.getMessage();
1473N/A // this little hack to emp. detect deleted/moved files
1473N/A<p><%= basename %> for revision <%= rev.substring(2) %> is empty. It was
1473N/A a = AnalyzerGuru.find(in);
1473N/A g = AnalyzerGuru.getGenre(a);
1473N/A<p>Binary file [Click <a href="<%= Util.uriEncodePath(rawPath) %>?<%= rev
1473N/A <span class="pagetitle"><%= Util.htmlize(basename) %> revision <%=
1473N/A rev.substring(2) %></span><%
1473N/A if (g == Genre.PLAIN) {
1473N/A Annotation annotation = cfg.getAnnotation();
1473N/A AnalyzerGuru.writeXref(a, r, xout , defs,
1473N/A annotation, Project.getProject(resourceFile));
1473N/A } else if (g == Genre.IMAGE) {
1473N/A <img src="<%= Util.uriEncodePath(rawPath) %>?<%= rev %>"/><%
1473N/A } else if (g == Genre.HTML) {
1473N/A %> Click <a href="<%= Util.uriEncodePath(rawPath) %>?<%=
1473N/A rev %>">download <%= Util.htmlize(basename) %></a><%
1473N/A error = e.getMessage();
1473N/A IOUtils.close(in);
1473N/A IOUtils.close(xout);
1473N/A } else if (g == Genre.IMAGE) {
1473N/A <img src="<%= Util.uriEncodePath(rawPath) %>?<%= rev %>"/>
1473N/A <p>Binary file [Click <a href="<%= Util.uriEncodePath(rawPath) %>?<%= rev
1473N/A if (!cfg.annotate()) {
1473N/A xrefFile = cfg.findDataFile();
1473N/A XrefInputStream.dump(xrefFile, out, true);
1473N/A FileAnalyzerFactory a = AnalyzerGuru.find(basename);
1473N/A Genre g = AnalyzerGuru.getGenre(a);
1473N/A a = AnalyzerGuru.find(bin);
1473N/A g = AnalyzerGuru.getGenre(a);
1473N/A if (g == Genre.IMAGE) {
1473N/A <img src="<%= Util.uriEncodePath(rawPath) %>"/>
1473N/A } else if (g == Genre.HTML) {
1473N/A } else if (g == Genre.PLAIN) {
1473N/A Definitions defs = IndexDatabase.getDefinitions(resourceFile);
1473N/A Annotation annotation = cfg.getAnnotation();
1473N/A AnalyzerGuru.writeXref(a, r, xout, defs, annotation,
1473N/A Project.getProject(resourceFile));
1469N/AClick <a href="<%= Util.uriEncodePath(rawPath) %>">download <%=
1469N/A Util.htmlize(basename) %></a><%
1473N/A IOUtils.close(bin);
1473N/A IOUtils.close(xout);