Commits

J. Ryan Stinnett committed 798d997

Further cleanup from the upstream rebase, fixed JS error when symbol list isn't defined

Comments (0)

Files changed (6)

bazaarvoice-customizations

 # User J. Ryan Stinnett <jryans@gmail.com>
 # Date 1295076996 21600
 # Node ID a0baf2a260b3a7d8c496cd32e7b323a571462f52
-# Parent  cb9e8afb804c53f32f271da04674c823adf31f0f
+# Parent 166c1e6b7de93c1dcceed74b5351164465832e9d
 Bazaarvoice-specific customizations
 
 diff --git a/src/org/opensolaris/opengrok/search/Results.java b/src/org/opensolaris/opengrok/search/Results.java
 diff --git a/web/default/style.css b/web/default/style.css
 --- a/web/default/style.css
 +++ b/web/default/style.css
-@@ -1,144 +1,195 @@
+@@ -1,144 +1,196 @@
 -body {
 -background-color: #ffffff;
 -/*font-size: 100.01%; /* 12px [1] */
 +ul, dl {font-size: 1.4em;}
 +    ul ul {font-size: 1em;}
 +    dt {color: #ff5200; font-weight: bold;}
-+pre {font-family: Consolas, 'Lucida Console', Monaco, monospace; font-size: 1.2em; margin: 0 0 1.4em;}
++pre {font-family: Consolas, 'Lucida Console', Monaco, monospace; font-size: 1.2em; margin: 0 0 1.4em; color: #333333;}
 +hr {border: 1px solid #cccccc; margin-top: 1em;}
 +    hr.hr-top {display: none; margin-bottom: 1em;}
 +    .page-results hr.hr-bottom {display: none;}
 +                    .alt {background-color: #eef8fe;} /* odd rows */
 +            ul.filelist {font-family: Consolas, 'Lucida Console', Monaco, monospace; font-size: 0.8em; margin-top: 0;}
 +            p.action {margin-top: 3em;}
++        #src {color: #000000;}
 +    #footer {background: #101010 url(./img/backgroundFooter.jpg) no-repeat left bottom; clear: both; color: #cccccc; line-height: 1.5em; padding: 2em 50px 1.5em;}
 +        #footer a:link, #footer a:visited, #footer a:hover, #footer a:active {color: #ffffff;}
 +        #footer p {font-size: 1em; margin-bottom: 0;}
 +            .sym_list input[type=text] {font-size: 1.2em; width: 18em;}
 +                .sym_list input[type=text]:focus {background-color: #eeeeee;}
 +            .sym_list button.primary {display: block; font-size: 1em;}
-+            ul.list-definitions {font-family: Consolas, 'Lucida Console', Monaco, monospace; font-size: 1em; list-style-type: disc;}
 +            ul.list-definitions-master {border-top: 2px solid #eeeeee; font-family: Helvetica, Helvetica Neue, Arial, sans-serif; padding-top: 1em; padding-left: 0;}
-+                .list-definitions-type {list-style-type: none;}
-+        
++                li.list-definitions-type {list-style-type: none; margin-bottom: 10px;}
++                    ul.list-definitions {font-family: Consolas, 'Lucida Console', Monaco, monospace; font-size: 1em; list-style-type: disc; margin-top: 5px;}
+ 
+-#MastheadLogo {
+-	background-color: white;
+-	background-image: url(./img/Logo.png);
+-	background-position: 0px 2px;
+-	background-repeat: no-repeat;
+-	float: left;
+-	height: 43px;
+-	width: 172px;
+-	border: none;
+-	text-decoration: none;
+-}
 +        /* diff page */
 +        #difftable {}
 +            .diffkey {background-color: rgba(247,247,247,0.5); border: 1px solid rgba(238,238,238,0.5); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; margin-top: 0; padding: 0.5em; position: fixed; top: 11em; right: 5em;}
 +                #difftable th {background-color: #eeeeee;}
 +                tr.k {border-bottom: 1px dashed #ccc;}
 +                td.d {background-color: #eeeeee;}
-+                .indicator-break {font-family: Helvetica, Helvetica Neue, Arial, sans-serif; margin: 1.25em 0;}
++                .indicator-break {font-family: Helvetica, Helvetica Neue, Arial, sans-serif; margin: 1.25em 0; color: #666666;}
 +                .indicator-break .prefix {background-image: none; padding-left: 0;}
 +                #difftable span.d {background-color: #ffffcc;} /* deleted */
 +                #difftable span.a {background-color: #ccffcc;} /* added */
 +        /* list page */
 +        #line_numbers {padding-right: 0.5em;}
  
--#MastheadLogo {
--	background-color: white;
--	background-image: url(./img/Logo.png);
--	background-position: 0px 2px;
--	background-repeat: no-repeat;
--	float: left;
--	height: 43px;
--	width: 172px;
--	border: none;
--	text-decoration: none;
+-#pagetitle {
+-	float: right;
+-	font-size: large;
+-	color:#5382a1;
+-	text-align:right;
 -}
 +.l, .hl {background-color: #dddddd; display: inline-block; padding-right: 1em; text-align: right; width: 4em;}
 +.blame .l {padding-right: 0; width: auto;}
 +.hl-hide {display: none}
 +.l.d {background-color: #ffffcc; text-decoration: line-through;}
  
--#pagetitle {
--	float: right;
--	font-size: large;
--	color:#5382a1;
+-#filename {
+-	font-size: x-large;
+-	color:#000;
 -	text-align:right;
 -}
 +a.p, a.r {background-image: url(./img/icons.gif); background-repeat: no-repeat; padding-left: 20px;}
 +a.p {background-position: 0 -920px;}
 +    a.p:hover {background-position: 0 -960px;}
  
--#filename {
--	font-size: x-large;
--	color:#000;
--	text-align:right;
--}
--
 -#bar {
 -	padding-left: 0.5em;
 -	margin-bottom:0.2em;
 -#src tt{padding-left:1em; padding-right:1em;}
 -
 -.fli {background-color: #ffa;} /* focused line */
-+.fli {background-color: #ffffcc;} /* focused line */
++.fli {background-color: #ffffaa;} /* focused line */
  
  .sl {color:#999;text-decoration:underline;}
  td.a{color:#000}
-@@ -192,64 +243,8 @@
- #results td.q {white-space: nowrap;font-size: xx-small;width:3em;}
- #results td.f{width:3em;padding-left:2em;padding-right:.5em;}
+@@ -146,7 +198,6 @@
+ .s  {color:green;} /* strings */
+ .c  {color:#666;} /* comments */
+ .b  {color:#000; font-weight:bold;} /* comments */
+-.k  {color:#000; font-family:monospace;} /* comments */
+ .i  {color:#00008b; font-weight:bold;} /* interpolations */
+ .di {color:#00008b; font-weight:bold;} /* directives */
+ .bi {color:#666;} /* built-in */
+@@ -182,74 +233,6 @@
+ a.xmt {color:#00f; font-weight:bold; text-decoration:none;} /* method */
+ a.xsr {color:#00f; font-weight:bold; text-decoration:none;} /* subroutine */
  
++.rssbadge {text-align: right;}
+ 
+-#results {margin-top:.5em;}
+-#results .con{font-size:small;color:#000;}
+-#more .l, #results .l { color:#666; }
+-#results .m {background-color:#ffb;}
+-#results i {color: green; font-weight:bold;}
+-#results tr.dir{background-color:#C5D5A9;}
+-#results td.q {white-space: nowrap;font-size: xx-small;width:3em;}
+-#results td.f{width:3em;padding-left:2em;padding-right:.5em;}
+-
 -#more { line-height:1.25em;}
 -#more b { background-color:#ffff99;}
 -
 -#Footer a {
 -	color: #555;
 -}
-+.rssbadge {text-align: right;}
- 
- .more {background-color:#fff;border: 1px #ccc solid;padding:.3em;margin:1px;}
+-
+-.more {background-color:#fff;border: 1px #ccc solid;padding:.3em;margin:1px;}
 -.sel {background-color:#A3B8CB;border: 1px #336 solid;padding:.5em;margin:1px;}
 -.error {color: brown;}
- 
+-
 -span.blame { }
 -span.blame-hidden { display: none }
 -
  
  --%><%@ page import = "javax.servlet.*,
  java.lang.*,
-@@ -33,7 +33,16 @@
+@@ -33,7 +33,15 @@
  org.opensolaris.opengrok.web.*,
  org.opensolaris.opengrok.history.*,
  org.apache.commons.jrcs.diff.*"
 -%><%@include file="mast.jsp"%><%!
 +%>
-+<%@ page session="false" %><%@ page errorPage="error.jsp"%>
 +<%
 +RuntimeEnvironment environment = RuntimeEnvironment.getInstance();
 +String path = request.getPathInfo();
  
  String readableLine(int n) {
      if (n < 10) {
-@@ -43,7 +52,21 @@
+@@ -43,7 +51,21 @@
      }
  }
  
  
  if (valid) {
      final String rp1 = request.getParameter("r1");
-@@ -58,20 +81,20 @@
+@@ -58,20 +80,20 @@
      try {
          if (rp1!=null) tmp = rp1.split("@");
          if (tmp != null && tmp.length == 2) {
      } catch (UnsupportedEncodingException e) {
      }
  
-@@ -89,7 +112,7 @@
+@@ -89,7 +111,7 @@
                  in1 = HistoryGuru.getInstance().getRevision(rpath1.getParent(), rpath1.getName(), r1);
                  in2 = HistoryGuru.getInstance().getRevision(rpath2.getParent(), rpath2.getName(), r2);
              } catch (Exception e) {
              }
              try {
                  if (in1 != null && in2 != null) {
-@@ -97,10 +120,23 @@
+@@ -97,10 +119,23 @@
                      if (g == null) {
                          g = AnalyzerGuru.getGenre(in1);
                      }
                      } else if (g == Genre.PLAIN || g == Genre.HTML) {
  //--------Do THE DIFFS------------
                          ArrayList<String> l1 = new ArrayList<String>();
-@@ -122,207 +158,223 @@
+@@ -122,207 +157,223 @@
                          Revision rev = Diff.diff(file1, file2);
                          
                          if(rev.size() == 0) {
                                              }
                                              
  // NEW -----------
-@@ -331,24 +383,24 @@
+@@ -331,24 +382,24 @@
                                              if (cn2 > ln2) {
                                                  if(full || cn2 - ln2 < 20) {
                                                      for(int j = ln2; j  < cn2 ; j++) {
                                              }
                                              
              }
-@@ -360,63 +412,63 @@
+@@ -360,63 +411,63 @@
  // dump the remaining
                                  if (format.equals("s")) {
                                      if (full || file1.length - ln1 < 20) {
                                          }
                                      }
                                  
-@@ -426,13 +478,13 @@
+@@ -426,13 +477,13 @@
  %></pre></div><%
                          }
                      } else {
              } finally {
                  if(in1 != null)
                      try {
-@@ -446,16 +498,16 @@
+@@ -446,16 +497,16 @@
                  }
              }
          } else if (g == Genre.IMAGE) {
 diff --git a/web/help.jsp b/web/help.jsp
 --- a/web/help.jsp
 +++ b/web/help.jsp
-@@ -21,100 +21,127 @@
+@@ -21,100 +21,135 @@
  
  --%><%@ page import = "org.opensolaris.opengrok.configuration.RuntimeEnvironment"
               session="false" errorPage="error.jsp" %><%
  RuntimeEnvironment environment = RuntimeEnvironment.getInstance();
  environment.register();
 -String pageTitle = "OpenGrok Help";
-+String pageTitle = "Inspector Gadget Help";
++String pageTitle = "Inspector Gadget help";
  %><%@ include file="httpheader.jspf" %>
 -<body>
 -    <div id="page">
 -                        </form>
 -            </td></tr></table>
 +<body class="page page-help">
-+    <script type="text/javascript" src="<%=context%>/jquery-1.4.2.min.js"></script>
++    <script type="text/javascript" src="<%=context%>/jquery-1.4.4.min.js"></script>
 +    <script type="text/javascript">
 +        $(document).ready(function() {
 +            $('h2[id],h3[id]').each(function() {
 +                <p class="note"><span class="prefix">Note:</span> they must be in ALL CAPS.</p>
 +                
 +                <hr/>
++
++                <h2 id="word">What is a word?</h2>
++                <ul>
++                    <li>Indexed words are made up of alphanumeric and underscore characters.</li>
++                    <li>One letter words are usually not indexed as symbols.</li>
++                    <li>Most other characters (including single and double quotes) are ignored, so even if you escape them, they will not be found.</li>
++                    <ul>
++                        <li>The exceptions are: <span class="code code-search">@ $ % ^ &amp; = ? . :</span> which are typically indexed as separate words.</li>
++                        <li>Some of these are part of the query syntax, so they must be escaped with a backslash.</li>
++                    </ul>
++                    <li>This explains why searching for <span class="code code-search">\+1</span> or <span class="code code-search">\+ 1</span> will both find +1 and + 1.</li>
++                </ul>
++
++                <hr/>
 +                
 +                <h2>Advanced searches</h2>
 +                
 +                
 +                <h3 id="proximity">Proximity search</h3>
 +                <p>Proximity searches look for results where terms are within a certain number of words from each other. Use the tilde, "<span class="code code-search">~</span>" symbol at the end of a phrase.</p>
-+                <p>For example, to search for all clients that set "pageSize" to "6", which are within two <span class="term term-keyword">words</span> (i.e., alphanumeric strings) of each other, enter <span class="code code-search">"pageSize 6"~2</span> in the General text field.</p>
++                <p>For example, to search for all clients that set "pageSize" to "6", which are within two words (i.e., alphanumeric strings) of each other, enter <span class="code code-search">"pageSize 6"~2</span> in the General text field.</p>
 +                
 +                <h3>Range search</h3>
 +                <p>Range searches allow one to match documents whose field(s) values are between the lower and upper bound specified by the range query. Range queries can be inclusive or exclusive of the upper and lower bounds. Sorting is done lexicographically. Inclusive queries are denoted by square brackets <span class="code code-search">[ ]</span>, exclusive by curly brackets <span class="code code-search">{ }</span>. For example, <span class="code code-search">title:{Aida TO Carmen}</span> will find all documents between Aida to Carmen, exclusive of Aida and Carmen.</p>
 -The exceptions are: <b>@ $ % ^ &amp; = ? . :</b> which are mostly indexed as separate words.<br>
 -Because some of them are part of the query syntax, they must be escaped with a reverse slash as noted above.<br>
 -So searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
-+                <h3>Boosting terms</h3>
-+                <p>Terms and phrases can be boosted (i.e., made more relevant) using a caret (<span class="code code-search">^</span>) and a positive decimal value to indicate desired boost level (e.g., <span class="code code-search">1.5</span> or <span class="code code-search">3</span>). For instance, <span class="code code-search">help^4 opengrok</span> will boost the term "help". (The default boost level if you don't specify it for a term is 1.)</p>
-+                
-+                <h2 id="escaping">Escaping special characters</h2>
-+                <p>Opengrok supports escaping special characters that are part of the query syntax. The current list of special characters is below:<br/>
-+                    <span class="code code-search">+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ </span>
-+                <p>To escape these characters, use the backslash (<span class="code code-search">\</span>) symbol before each special character. For example, to search for (1+1):2, enter <span class="code code-search">\(1\+1\)\:2</span> in the General text field.</p>
-+                <p>Indexed words are made up of alphanumeric and underscore characters. One letter words are usually not indexed as symbols.<br>
-+                    Most other characters (including single and double quotes) are treated as "spaces/whitespace" (so even if you escape them, they will not be found, since most analyzers ignore them). <br>
-+                    The exceptions are: <span class="code code-search">@ $ % ^ &amp; = ? . :</span> which are mostly indexed as separate words.<br>
-+                    Because some of them are part of the query syntax, they must be escaped with a reverse slash as noted above.<br>
-+                    So searching for <span class="code code-search">\+1</span> or <span class="code code-search">\+ 1</span> will both find <span class="code code-search">+1</span> and <span class="code code-search">+ 1</span>.
-                 </p>
+-                </p>
 -                    
 -                valid <u>FIELDs</u> are
 -                <pre>
 -                    
 -                <p>Opengrok search is powered by <a href="http://lucene.apache.org/">lucene</a>, for more detail on query syntax refer to lucene docs.</p>
 -            </p>
++                <h3>Boosting terms</h3>
++                <p>Terms and phrases can be boosted (i.e., made more relevant) using a caret (<span class="code code-search">^</span>) and a positive decimal value to indicate desired boost level (e.g., <span class="code code-search">1.5</span> or <span class="code code-search">3</span>). For instance, <span class="code code-search">help^4 opengrok</span> will boost the term "help". (The default boost level if you don't specify it for a term is 1.)</p>
++                
++                <h2 id="escaping">Escaping special characters</h2>
++                <p>Opengrok supports escaping special characters that are part of the query syntax. The current list of special characters is below:<br/>
++                    <span class="code code-search">+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ </span>
++                <p>To escape these characters, use the backslash (<span class="code code-search">\</span>) symbol before each special character. For example, to search for (1+1):2, enter <span class="code code-search">\(1\+1\)\:2</span> in the General text field.</p>
 +                <h2>Tips</h2>
 +                <ul>
 +                    <li>Client and file type restrictions can be added via the file path. For example, <span class="code code-search">olay xml</span> will only search *.xml files for the Olay client. (If you want to search across all Olay clients, use a multiple character wildcard: <span class="code code-search">olay* xml</span>.)</li>
  "
 -%><%@include file="mast.jsp"%><% String hcontext = request.getContextPath(); %>
 +%>
-+<%@ page session="false" %><%@ page errorPage="error.jsp"%>
 +<%
 +RuntimeEnvironment environment = RuntimeEnvironment.getInstance();
 +String path = request.getPathInfo();
 +%>
 +<%@ include file="httpheader.jspf" %>
 +<body class="page page-history">
-+    <%@include file="mast.jsp"%><% String hcontext = request.getContextPath(); %>
++    <%@include file="mast.jsp"%>
++    <% String hcontext = request.getContextPath(); %>
  <script type="text/javascript">
  // <![CDATA[
  function toggle_filelist() {
  org.opensolaris.opengrok.history.*
  "
 -%><%@include file="mast.jsp"%>
-+%><%@ page session="false" %><%@ page errorPage="error.jsp"%>
++%>
 +<%
 +RuntimeEnvironment environment = RuntimeEnvironment.getInstance();
 +String path = request.getPathInfo();
  <% if (!isDir) { %>
  <script type="text/javascript">/* <![CDATA[ */
  function lntoggle() {
-@@ -54,19 +62,16 @@
+@@ -54,19 +62,15 @@
  function get_sym_list_contents()
  {
      var contents = "";
 -    //contents += "&nbsp;&nbsp;";
 -    //contents += "<b><a href=\"#\" onclick=\"javascript:add_highlight();return false;\" title=\"Add highlight\">Highlight</a></b><br>";
 -    contents += "<a href=\"#\" onclick=\"javascript:lsttoggle();\">[Close]</a><br>"
-+    contents += "<label for=\"input_highlight\" title=\"Usages and definitions of macros/functions/classes; recommended for ftl and java files\"><span class=\"fieldLabel\">Usages</span><span class=\"fieldHelper\"><span class=\"hint hint-case-sensitive\" title=\"case sensitive\">&nbsp;</span></span></label>";
++    contents += "<label for=\"input_highlight\" title=\"Usages and definitions of macros/functions/classes; recommended for ftl and java files\"><span class=\"fieldLabel\">Usages</span></label>";
 +    //contents += "<input type=\"text\" id=\"input_highlight\" name=\"input_highlight\" class=\"q\"/>";
 +    //contents += "<button class=\"primary\" onclick=\"javascript:add_highlight();return false;\" title=\"Highlight references (macro/function/class definitions)\">Highlight</button>";
 +    contents += "<ul class=\"list-definitions list-definitions-master\" id=\"list-definitions-master-id\">"
-+    contents += "<a href=\"#\" onclick=\"javascript:lsttoggle();\">[Close]</a><br>";
  
      var symbol_classes = get_sym_list();
      for (var i = 0; i < symbol_classes.length; i++) {
  
          var class_name = symbol_class[1];
  
-@@ -76,11 +81,14 @@
+@@ -76,11 +80,14 @@
              var symbol = symbols[j][0];
              var line = symbols[j][1];
              contents +=
      return contents;
  }
  
-@@ -92,7 +100,7 @@
+@@ -92,7 +99,7 @@
  }
  
  // Initial value
  document.sym_div_height_max = 480;
  document.sym_div_top = 100;
  document.sym_div_left_margin = 40;
-@@ -100,7 +108,7 @@
+@@ -100,7 +107,7 @@
  
  function get_sym_div_left()
  {
      return document.sym_div_left;
  }
  
-@@ -129,10 +137,10 @@
+@@ -129,10 +136,10 @@
      if (document.sym_div == null)
      {
          document.sym_div = document.createElement("div");
          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";
-@@ -142,12 +150,16 @@
+@@ -142,12 +149,16 @@
  
          document.body.appendChild(document.sym_div);
          document.sym_div_shown = 1;
              document.sym_div_shown = 0;
          }
          else
-@@ -156,7 +168,7 @@
+@@ -156,7 +167,7 @@
              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_shown = 1;
          }
      }
-@@ -197,11 +209,13 @@
+@@ -197,11 +208,13 @@
  function HighlightKeyword(keyword)
  {
      var high_colors=[
  
      var pattern = "a:contains('" + keyword + "')";
      $(pattern).css({
-@@ -339,7 +353,7 @@
+@@ -339,7 +352,7 @@
  
                          if (br != null) {
                            int len = 0;
                            while((len = br.read(buf)) > 0) {
                                out.write(buf, 0, len);
                            }
-@@ -384,7 +398,7 @@
+@@ -384,7 +397,7 @@
                          if (g == Genre.DATA || g == Genre.XREFABLE || g == null) {
  		            %><div id="src">Binary file [Click <a href="<%=context%>/raw<%=path%>?r=<%=rev%>">here</a> to download] </div><%
                          } else {
                              if (g == Genre.PLAIN) {
                                  // We don't have any way to get definitions
                                  // for old revisions currently.
-@@ -484,7 +498,7 @@
+@@ -484,7 +497,7 @@
              }
          }
      }
 diff --git a/web/mast.jsp b/web/mast.jsp
 --- a/web/mast.jsp
 +++ b/web/mast.jsp
-@@ -29,7 +29,7 @@
-              org.opensolaris.opengrok.web.Util,
-              org.opensolaris.opengrok.web.Constants,
-              org.opensolaris.opengrok.history.HistoryGuru"
--             %><%@ page session="false" %><%@ page errorPage="error.jsp"%><%
-+             %><%
- 
- // Use UTF-8 if no encoding is specified in the request
- if (request.getCharacterEncoding() == null) {
-@@ -136,7 +136,6 @@
+@@ -39,9 +39,7 @@
+ String context = request.getContextPath();
+ String servlet = request.getServletPath();
+ String reqURI = request.getRequestURI();
+-String path = request.getPathInfo();
+ if (path == null) path = "";
+-RuntimeEnvironment environment = RuntimeEnvironment.getInstance();
+ environment.setUrlPrefix(context + Constants.searchR + "?");
+ environment.register();
+ String rawSource = environment.getSourceRootPath();
+@@ -136,7 +134,6 @@
              } catch (Exception e) {
                  dtag = "";
              }
      String rev = request.getParameter("r");
              if (rev == null) {
                  rev = "";
-@@ -145,7 +144,6 @@
+@@ -144,8 +141,7 @@
+                 rev = "&r=" + rev;
              }
      String h = request.getParameter("h");
- %><%@ include file="httpheader.jspf" %><%//below style is for the fancy always on top search bar%>
+-%><%@ include file="httpheader.jspf" %><%//below style is for the fancy always on top search bar%>
 -<body style="overflow:hidden;">
++%><%//below style is for the fancy always on top search bar%>
  <script type="text/javascript" src="<%=context%>/jquery-1.4.4.min.js"></script>
  <script type="text/javascript">/* <![CDATA[ */
  function get_annotations() {
-@@ -167,8 +165,8 @@
+@@ -167,8 +163,8 @@
  function toggle_annotations() {
    $("span").each(function() {      
        if (this.className == 'blame') {
           this.className = 'blame';
        }
       }
-@@ -177,83 +175,85 @@
+@@ -177,83 +173,85 @@
  $().ready(function() {
      $('a[name=r]').tooltip({
          left: 5,
  org.apache.lucene.queryParser.*,
  org.apache.lucene.search.*"
 -%><%@include file="mast.jsp"%><%
-+%><%@ page session="false" %><%@ page errorPage="error.jsp"%>
++%>
 +<%
 +RuntimeEnvironment environment = RuntimeEnvironment.getInstance();
 +String path = request.getPathInfo();

check-js-symbol-list

+# HG changeset patch
+# Parent b7c26b499d835403f39b57b4423d352e1f51d9b9
+# User J. Ryan Stinnett <jryans@gmail.com>
+# Date 1295187277 21600
+
+Fixes a JavaScript error when opening the symbol list and no symbols are available
+
+diff --git a/web/list.jsp b/web/list.jsp
+--- a/web/list.jsp
++++ b/web/list.jsp
+@@ -60,6 +60,11 @@
+     //contents += "<b><a href=\"#\" onclick=\"javascript:add_highlight();return false;\" title=\"Add highlight\">Highlight</a></b><br>";
+     contents += "<a href=\"#\" onclick=\"javascript:lsttoggle();\">[Close]</a><br>"
+ 
++    // Symbol list is only defined when definitions were accessible (i.e. for the latest revision of a file)
++    if (!$.isFunction(window.get_sym_list)) {
++        return contents;
++    }
++
+     var symbol_classes = get_sym_list();
+     for (var i = 0; i < symbol_classes.length; i++) {
+         if (i > 0) {

freemarker-support

 # User J. Ryan Stinnett <jryans@gmail.com>
 # Date 1295076995 21600
 # Node ID 3d24e2d206cf5d240bbe9f833d4f9ffea7cfec61
-# Parent  ac64ff6eac7de69b2a509f28e7207cfe0d9a57f6
+# Parent ac64ff6eac7de69b2a509f28e7207cfe0d9a57f6
 Adds support for FreeMarker files
 
 diff --git a/build.xml b/build.xml
 new file mode 100644
 --- /dev/null
 +++ b/src/org/opensolaris/opengrok/analysis/freemarker/FreeMarkerAnalyzer.java
-@@ -0,0 +1,95 @@
+@@ -0,0 +1,96 @@
 +/*
 + * CDDL HEADER START
 + *
 +import org.apache.lucene.analysis.TokenStream;
 +import org.apache.lucene.document.Document;
 +import org.apache.lucene.document.Field;
++import org.opensolaris.opengrok.analysis.Definitions;
 +import org.opensolaris.opengrok.analysis.FileAnalyzerFactory;
-+import org.opensolaris.opengrok.analysis.java.JavaXref;
 +import org.opensolaris.opengrok.analysis.plain.PlainAnalyzer;
 +import org.opensolaris.opengrok.configuration.Project;
 +import org.opensolaris.opengrok.history.Annotation;
 +     * @param out Output xref writer
 +     * @param annotation annotation for the file (could be null)
 +     */
-+    static void writeXref(Reader in, Writer out, Annotation annotation, Project project) throws IOException {
++    static void writeXref(Reader in, Writer out, Definitions defs, Annotation annotation, Project project) throws IOException {
 +        FreeMarkerXref xref = new FreeMarkerXref(in);
 +        xref.annotation = annotation;
 +        xref.project = project;
++        xref.setDefs(defs);
 +        xref.write(out);
 +    }
 +}
 new file mode 100644
 --- /dev/null
 +++ b/src/org/opensolaris/opengrok/analysis/freemarker/FreeMarkerAnalyzerFactory.java
-@@ -0,0 +1,63 @@
+@@ -0,0 +1,64 @@
 +/*
 + * CDDL HEADER START
 + *
 +
 +package org.opensolaris.opengrok.analysis.freemarker;
 +
++import org.opensolaris.opengrok.analysis.Definitions;
 +import org.opensolaris.opengrok.analysis.FileAnalyzer;
 +import org.opensolaris.opengrok.analysis.FileAnalyzer.Genre;
 +import org.opensolaris.opengrok.analysis.FileAnalyzerFactory;
 +    }
 +
 +    @Override
-+    public void writeXref(Reader in, Writer out, Annotation annotation, Project project)
++    public void writeXref(Reader in, Writer out, Definitions defs, Annotation annotation, Project project)
 +        throws IOException {
-+        FreeMarkerAnalyzer.writeXref(in, out, annotation, project);
++        FreeMarkerAnalyzer.writeXref(in, out, defs, annotation, project);
 +    }
 +}
 diff --git a/src/org/opensolaris/opengrok/analysis/freemarker/FreeMarkerSymbolTokenizer.lex b/src/org/opensolaris/opengrok/analysis/freemarker/FreeMarkerSymbolTokenizer.lex
 spring-xml-support #-stable
 tabular-xref
 xref-line-highlight
+check-js-symbol-list
 bazaarvoice-customizations
 # User J. Ryan Stinnett <jryans@gmail.com>
 # Date 1295076995 21600
 # Node ID e531bb8f756c408c77f86fd719de68ad2fe83aba
-# Parent  3d24e2d206cf5d240bbe9f833d4f9ffea7cfec61
+# Parent 83b93e14ccea073c2daf4ef09b8c45ceeb06a832
 Change to a table for xrefs for easier copying
 
 diff --git a/src/org/opensolaris/opengrok/analysis/JFlexXref.java b/src/org/opensolaris/opengrok/analysis/JFlexXref.java
      }
  
      public void setDefs(Definitions defs) {
-@@ -149,13 +159,24 @@
+@@ -145,17 +155,31 @@
+     /**
+      * Write xref to the specified {@code Writer}.
+      *
+-     * @param out xref destination
++     * @param xrefOut xref destination
       * @throws IOException on error when writing the xref
       */
-     public void write(Writer out) throws IOException {
+-    public void write(Writer out) throws IOException {
 -        this.out = out;
--        writeSymbolTable();
++    public void write(Writer xrefOut) throws IOException {
 +        this.xrefOut = xrefOut; // line numbers are written directly
 +        out = new StringWriter(); // xref of actual file contents is buffered and then written after the line numbers
 +
++        // Write out the symbol table
+         writeSymbolTable();
++
 +        // Start table and line number column
 +        xrefOut.write("<table cellpadding=\"0\" cellspacing=\"0\"><tr><td>");
          setLineNumber(0);
      }
  
      /**
-@@ -262,9 +283,40 @@
+@@ -200,41 +224,41 @@
+             }
+         }
+ 
+-        out.append("<script type=\"text/javascript\">/* <![CDATA[ */\n");
+-        out.append("function get_sym_list(){return [");
++        xrefOut.append("<script type=\"text/javascript\">/* <![CDATA[ */\n");
++        xrefOut.append("function get_sym_list(){return [");
+ 
+         boolean first = true;
+         for (String[] style : DEFINITION_STYLES) {
+             SortedSet<Tag> tags = symbols.get(style[0]);
+             if (tags != null) {
+                 if (!first) {
+-                    out.append(',');
++                    xrefOut.append(',');
+                 }
+-                out.append("[\"");
+-                out.append(style[2]);
+-                out.append("\",\"");
+-                out.append(style[1]);
+-                out.append("\",[");
++                xrefOut.append("[\"");
++                xrefOut.append(style[2]);
++                xrefOut.append("\",\"");
++                xrefOut.append(style[1]);
++                xrefOut.append("\",[");
+ 
+                 boolean firstTag = true;
+                 for (Tag tag : tags) {
+                     if (!firstTag) {
+-                        out.append(',');
++                        xrefOut.append(',');
+                     }
+-                    out.append('[');
+-                    out.append(Util.jsStringLiteral(tag.symbol));
+-                    out.append(',');
+-                    out.append(Integer.toString(tag.line));
+-                    out.append(']');
++                    xrefOut.append('[');
++                    xrefOut.append(Util.jsStringLiteral(tag.symbol));
++                    xrefOut.append(',');
++                    xrefOut.append(Integer.toString(tag.line));
++                    xrefOut.append(']');
+                     firstTag = false;
+                 }
+-                out.append("]]");
++                xrefOut.append("]]");
+                 first = false;
+             }
+         }
+ 
+-        out.append("];}");
+-        out.append("/* ]]> */</script>\n");
++        xrefOut.append("];}");
++        xrefOut.append("/* ]]> */</script>\n");
+     }
+ 
+     /**
+@@ -262,9 +286,40 @@
       * @throws IOException on error when writing the xref
       */
      protected void startNewLine() throws IOException {
      }
  
      /**
-@@ -374,4 +426,28 @@
+@@ -374,4 +429,28 @@
              out.write(address);
          }
      }

xref-line-highlight

 # User J. Ryan Stinnett <jryans@gmail.com>
 # Date 1295076995 21600
 # Node ID cb9e8afb804c53f32f271da04674c823adf31f0f
-# Parent  e531bb8f756c408c77f86fd719de68ad2fe83aba
+# Parent d737761cb3e4e4a9fddafcb56827e706dfc2cfbc
 Adding centering and highlighting when targeting specific lines
 
 diff --git a/src/org/opensolaris/opengrok/analysis/JFlexXref.java b/src/org/opensolaris/opengrok/analysis/JFlexXref.java
 --- a/src/org/opensolaris/opengrok/analysis/JFlexXref.java
 +++ b/src/org/opensolaris/opengrok/analysis/JFlexXref.java
-@@ -163,7 +163,7 @@
-         out = new StringWriter(); // xref of actual file contents is buffered and then written after the line numbers
+@@ -166,7 +166,7 @@
+         writeSymbolTable();
  
          // Start table and line number column
 -        xrefOut.write("<table cellpadding=\"0\" cellspacing=\"0\"><tr><td>");
          setLineNumber(0);
          startNewLine();
          while (yylex() != yyeof) { // NOPMD while statement intentionally empty
-@@ -174,7 +174,7 @@
+@@ -177,7 +177,7 @@
          endCurrentLine();
  
          // End line number column and write the file contents
          xrefOut.write(out.toString());
          xrefOut.write("</td></tr></table>");
      }
-@@ -292,7 +292,7 @@
+@@ -295,7 +295,7 @@
          if (line > 1) {
              endCurrentLine();
          }
  
          // Reopen any existing spans
          for (String spanClass : spanClasses) {
-@@ -347,17 +347,7 @@
+@@ -350,17 +350,7 @@
                  style_class = style[1];
              }
  
              out.append("<a href=\"");
              out.append(urlPrefix);
              out.append("refs=");
-@@ -365,6 +355,8 @@
+@@ -368,6 +358,8 @@
              appendProject();
              out.append("\" class=\"");
              out.append(style_class);