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