list.jsp revision 9158900bac6adc966217d308f9ddea9f5eb540c7
2N/ASee LICENSE.txt included in this distribution for the specific
2N/Afile and include the License file at LICENSE.txt.
if (request.getCharacterEncoding() == null) {
request.setCharacterEncoding("UTF-8");
cfg = PageConfig.get(request);
Annotation annotation = cfg.getAnnotation();
int r = annotation.getWidestRevision();
int a = annotation.getWidestAuthor();
file="mast.jsp"
%><script type="text/javascript">/* <![CDATA[ */
document.pageReady.push(function() { pageReadyList();});
/* ---------------------- list.jsp start --------------------- */
cfg = PageConfig.get(request);
String rev = cfg.getRequestedRevision();
File resourceFile = cfg.getResourceFile();
String path = cfg.getPath();
String basename = resourceFile.getName();
if (cfg.isDir()) {
// mast.jsp assures, that resourceFile is valid and not /
// see cfg.resourceNotAvailable()
Project activeProject = Project.getProject(resourceFile);
String cookieValue = cfg.getRequestedProjectsAsString();
Set<String> projects = cfg.getRequestedProjects();
cookieValue = cookieValue.length() == 0
: activeProject.getDescription() + ',' + cookieValue;
// TODO hmmm, projects.jspf doesn't set a path
response.addCookie(cookie);
DirectoryListing dl = new DirectoryListing(cfg.getEftarReader());
List<String> files = cfg.getResourceFileList();
if (!files.isEmpty()) {
List<String> readMes = dl.listTo(
File[] catfiles = cfg.findDataFiles(readMes);
for (int i=0; i < catfiles.length; i++) {
%><h3><%= readMes.get(i) %></h3>
Util.dump(out, catfiles[i], catfiles[i].getName().endsWith(".gz"));
} else if (rev.length() != 0) {
FileAnalyzerFactory a = AnalyzerGuru.find(basename);
Genre g = AnalyzerGuru.getGenre(a);
in = HistoryGuru.getInstance()
.getRevision(resourceFile.getParent(), basename, rev);
error = e.getMessage();
a = AnalyzerGuru.find(in);
g = AnalyzerGuru.getGenre(a);
Binary file [Click <a href="<%= rawPath %>?r=<%= Util.URIEncode(rev) %>">here</a> to download]
<span class="pagetitle"><%= basename %> revision <%= Util.htmlize(rev) %></span>
if (g == Genre.PLAIN) {
Annotation annotation = cfg.getAnnotation();
//annotation.writeTooltipMap(out);
AnalyzerGuru.writeXref(a, r, out, defs,
annotation, Project.getProject(resourceFile));
} else if (g == Genre.IMAGE) {
<img src="<%= rawPath %>?r=<%= Util.URIEncode(rev) %>"/>
} else if (g == Genre.HTML) {
Util.dump(out, r);
%> Click <a href="<%= rawPath %>?r=<%= Util.URIEncode(rev) %>">download <%= basename %></a><%
error = e.getMessage();
try { r.close(); in = null;}
try { in.close(); }
} else if (g == Genre.IMAGE) {
<img src="<%= rawPath %>?r=<%= Util.URIEncode(rev) %>"/>
Binary file [Click <a href="<%= rawPath %>?r=<%= Util.URIEncode(rev) %>">here</a> to download]
if (!cfg.annotate()) {
xrefFile = cfg.findDataFile();
FileAnalyzerFactory a = AnalyzerGuru.find(basename);
Genre g = AnalyzerGuru.getGenre(a);
a = AnalyzerGuru.find(bin);
g = AnalyzerGuru.getGenre(a);
if (g == Genre.IMAGE) {
} else if ( g == Genre.HTML) {
Util.dump(out, r);
} else if (g == Genre.PLAIN) {
Definitions defs = IndexDatabase.getDefinitions(resourceFile);
Annotation annotation = cfg.getAnnotation();
AnalyzerGuru.writeXref(a, r, out, defs, annotation,
Project.getProject(resourceFile));
try { r.close(); bin = null; }
try { bin.close(); }
/* ---------------------- list.jsp end --------------------- */
include file="foot.jspf"