list.jsp revision ca15dc51dcf259e9433b86192acfbe8ddc0ada17
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerCDDL HEADER START
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerThe contents of this file are subject to the terms of the
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerCommon Development and Distribution License (the "License").
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerYou may not use this file except in compliance with the License.
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerSee LICENSE.txt included in this distribution for the specific
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian Kornbergerlanguage governing permissions and limitations under the License.
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerWhen distributing Covered Code, include this CDDL HEADER in each
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian Kornbergerfile and include the License file at LICENSE.txt.
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerIf applicable, add the following below this CDDL HEADER, with the
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian Kornbergerfields enclosed by brackets "[]" replaced with your own identifying
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian Kornbergerinformation: Portions Copyright [yyyy] [name of copyright owner]
9cfb01db247ca04bb4b5b337bbd77c66b7150e53Julian KornbergerCDDL HEADER END
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
--%><%@ page import = "javax.servlet.*,
java.io.*,
%><%@include file="mast.jsp"%>
<style type="text/css">
<script type="text/javascript">/* <![CDATA[ */
this.innerHTML='';
//contents += "<b><a href=\"#\" onclick=\"javascript:add_highlight();return false;\" title=\"Add highlight\">Highlight</a></b><br>";
for (var i = 0; i < class_names.length; i++)
if (this.className == class_names[i])
var fname = this.innerHTML;
var line = this.getAttribute("ln");
this.innerHTML + "</a><br>";
for (var i = 0; i < class_names.length; i++)
document.sym_div_width = 240;
document.sym_div_height_max = 480;
document.sym_div_top = 100;
document.sym_div_left = $(window).width() - (document.sym_div_width + document.sym_div_left_margin);
return document.sym_div_left;
document.sym_div_height = $(window).height() - document.sym_div_top - document.sym_div_height_margin;
return document.sym_div_height;
return document.sym_div_top;
return document.sym_div_width;
if (document.sym_div == null)
document.sym_div.id = "sym_div";
document.sym_div.className = "sym_list_style";
document.sym_div.style.margin = "0px auto";
document.sym_div.style.width = get_sym_div_width() + "px";
document.sym_div.style.height = get_sym_div_height() + "px";
document.sym_div.style.top = get_sym_div_top() + "px";
document.sym_div.style.left = get_sym_div_left() + "px";
document.sym_div.innerHTML = get_sym_list_contents();
if (document.sym_div_shown == 1)
document.sym_div.className = "sym_list_style_hide";
document.sym_div.style.height = get_sym_div_height() + "px";
document.sym_div.style.width = get_sym_div_width() + "px";
document.sym_div.style.top = get_sym_div_top() + "px";
document.sym_div.style.left = get_sym_div_left() + "px";
document.sym_div.className = "sym_list_style";
if (document.sym_div_shown == 1)
document.sym_div.style.left = get_sym_div_left() + "px";
document.sym_div.style.height = get_sym_div_height() + "px";
var tbox = document.getElementById('input_highlight');
HighlightKeyword(tbox.value);
ef.close();
Project activeProject = Project.getProject(resourceFile);
//TODO: somehow integrate below with projects.jspf
Cookie[] cookies = request.getCookies();
if (cookie.getName().equals("OpenGrokProject")) {
for (String proj : cookie.getValue().split(",")) {
if (Project.getByDescription(proj) != null) {
project.add(proj);
// set this in case there is no project selected or current cookie doesn't contain current project from the link, so the rest of search works 100% :)
StringBuffer sproject=new StringBuffer(activeProject.getDescription()+",");
Cookie cookie = new Cookie("OpenGrokProject", sproject.toString());
cookie.setPath(context + "/");
response.addCookie(cookie);
String[] files = resourceFile.list();
List<String> readMes = dl.listTo(resourceFile, out, path, files);
if(readMes != null && readMes.size() > 0) {
if (readmeFile.exists()) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
br.close();
response.sendError(404, "Revision not found");
FileAnalyzerFactory a = AnalyzerGuru.find(basename);
Genre g = AnalyzerGuru.getGenre(a);
response.sendError(404, "Revision not found");
a = AnalyzerGuru.find(in);
g = AnalyzerGuru.getGenre(a);
%><div id="src">Binary file [Click <a href="<%=context%>/raw<%=path%>?r=<%=rev%>">here</a> to download] </div><%
if (g == Genre.PLAIN) {
Annotation annotation = annotate ? HistoryGuru.getInstance().annotate(resourceFile, rev) : null;
//annotation.writeTooltipMap(out); //not needed yet
} else if (g == Genre.IMAGE) {
%><img src="<%=context+Constants.rawP+path%>?r=<%=rev%>"/><%
} else if (g == Genre.HTML) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
%> Click <a href="<%=context+Constants.rawP+path%>?r=<%=rev%>">download <%=basename%></a><%
%> <h3 class="error">IO Error</h3> <p> <%=e.getMessage() %> </p> <%
in.close();
} else if(g == Genre.IMAGE) {
%><div id="src"><img src="<%=context+Constants.rawP+path%>?r=<%=rev%>"/></div><%
%><div id="src"> Binary file [Click <a href="<%=context+Constants.rawP+path%>?r=<%=rev%>">here</a> to download] </div><%
if (environment.isCompressXref() ) {
if (xrefFile.exists()) {
if (xrefFile.exists()) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
br.close();
FileAnalyzerFactory a = AnalyzerGuru.find(basename);
Genre g = AnalyzerGuru.getGenre(a);
a = AnalyzerGuru.find(bin);
g = AnalyzerGuru.getGenre(a);
if (g == Genre.IMAGE) {
%><div id="src"><img src="<%=context+Constants.rawP+path%>"/></div><%
} else if( g == Genre.HTML) {
while((len = br.read(buf)) > 0) {
out.write(buf, 0, len);
} else if(g == Genre.PLAIN) {
Definitions defs = IndexDatabase.getDefinitions(resourceFile);
Annotation annotation = annotate ? HistoryGuru.getInstance().annotate(resourceFile, rev) : null;
%> Click <a href="<%=context+Constants.rawP+path%>">download <%=basename%></a><%
%><%@include file="foot.jspf"%><%
ef.close();