more.jsp revision 987
0N/A<%--
0N/ACDDL HEADER START
0N/A
0N/AThe contents of this file are subject to the terms of the
0N/ACommon Development and Distribution License (the "License").
0N/AYou may not use this file except in compliance with the License.
0N/A
0N/ASee LICENSE.txt included in this distribution for the specific
0N/Alanguage governing permissions and limitations under the License.
0N/A
0N/AWhen distributing Covered Code, include this CDDL HEADER in each
0N/Afile and include the License file at LICENSE.txt.
0N/AIf applicable, add the following below this CDDL HEADER, with the
0N/Afields enclosed by brackets "[]" replaced with your own identifying
0N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
0N/A
0N/ACDDL HEADER END
0N/A
928N/ACopyright 2010 Sun Microsystems, Inc. All rights reserved.
0N/AUse is subject to license terms.
0N/A
0N/A--%><%@ page import = "javax.servlet.*,
0N/Ajava.lang.*,
0N/Ajavax.servlet.http.*,
0N/Ajava.util.*,
0N/Ajava.io.*,
0N/Ajava.text.*,
0N/Aorg.opensolaris.opengrok.analysis.*,
0N/Aorg.opensolaris.opengrok.history.*,
0N/Aorg.opensolaris.opengrok.web.*,
0N/Aorg.opensolaris.opengrok.search.context.*,
986N/Aorg.opensolaris.opengrok.search.QueryBuilder,
947N/Aorg.opensolaris.opengrok.search.SearchEngine,
0N/Ajava.util.regex.*,
0N/Aorg.apache.lucene.queryParser.*,
947N/Aorg.apache.lucene.search.*"
0N/A%><%@include file="mast.jsp"%><%
0N/A
0N/Aif (valid) {
986N/A QueryBuilder qbuilder = new QueryBuilder()
986N/A .setFreetext(request.getParameter("full"))
986N/A .setDefs(request.getParameter("defs"))
986N/A .setRefs(request.getParameter("refs"))
986N/A .setPath(request.getParameter("path"))
986N/A .setHist(request.getParameter("hist"));
986N/A
987N/A // This is for backward compatibility with links created by OpenGrok 0.8.x
987N/A // and earlier. We used to concatenate the entire query into a single
987N/A // string and send it in the t parameter. If we get such a link, just add
987N/A // it to the freetext field, and we'll get the old behaviour. We can
987N/A // probably remove this code in the first feature release after 0.9.
987N/A String t = request.getParameter("t");
987N/A if (t != null) {
987N/A qbuilder.setFreetext(t);
987N/A }
987N/A
986N/A try {
986N/A Query tquery = qbuilder.build();
986N/A if (tquery != null) {
986N/A Context sourceContext = new Context(tquery, qbuilder.getQueries());
986N/A %><p><span class="pagetitle">Lines Matching <b><%=tquery%></b></span></p><div id="more" style="line-height:1.5em;"><pre><%
986N/A sourceContext.getContext(new FileReader(resourceFile), out, context+"/xref", null, path, null, false, null);
986N/A %></pre></div><%
986N/A }
986N/A } catch (Exception e) {
0N/A
986N/A }
0N/A}
0N/A
66N/A%><%@include file="foot.jspf"%>