Javadoc-search
About
Javadoc-search project provides a CGI script for indexing and
searching html files produced by javadoc tool. Javadoc-search allows
fast and convenient regular expression search for class and class
member names and for full method signatures that include argument
types.
Javadoc-search examines index html pages generated by javadoc and
installed in the local webserver document tree and builds its own
index for classes, class members, and class methods. Whenever a search
query is submitted, javadoc-search quickly matches the query against
the index and displays a list of matching links. Javadoc-search
provides assorted search and match display options.
Javadoc-search is implemented as a single Perl CGI script requiring
CGI, File, and Getopt modules.
The project is hosted at
http://sourceforge.net/projects/javadoc-search/
Screenshots
Single-frame mode
Substring Class Search,
Regexp Class Search, and
Substring Class#Member(Args) Search
Two-frame mode
Substring Class Search and
"I am feeling lucky"
Building index
Building Index
Downloading
The current release is 1.0.2. It works, and has been tested for a while in Linux and Windows. You may download it
from the SourceForge download area.
Installation instructions
-
Install your javadoc somewhere under your web server's docroot
-
Decide where the index file going to be stored and configure
$indexFile variable below. The index file does not have to be
accessible via the web. If you want the index file to be stored
in a compressed format, give it a .gz or .bz2 extension.
-
Modify %javadocRoots in the script to reflect the configuration
of the web server that serves your javadoc pages. List local
filesystem directories and their corresponding web docroot and web
alias settings in the following format:
%javadocRoots = ("LocalDir1" => [ "DocRoot1", "Alias1" ],
"LocalDir2" => [ "DocRoot2", "Alias2" ], ... );
For example,
%javadocRoots = ("/usr/local/apache/htdocs/docs" => ["/usr/local/apache/htdocs/docs", "/docs" ]);
-
Install this script in your web server. You may need rename the
script's extension to javadoc-search.cgi, if your web server
requires CGI scripts to have .cgi extension.
-
Build the index by invoking the script from the command line
with the -r option.
Additional Windows instructions
-
Make sure you have perl. You can get perl from
ActiveState. This is not the only one out there.
-
Follow instructions 1 through 5 above.
-
To create the index file you may need to do the following:
Open a "Command Prompt" or DOS window.
Type following. Make sure you substitute the approriate values
for <path_to_perl> and <path_to_javadoc-search> :
<path_to_perl>\perl.exe <path_to_javadoc-search>\javadoc-search.pl -r
-
Depending on how you have setup perl and apache, you may need to
modify the first line of javadoc-search.pl in order for the search to
work. Find the location of the perl binary. If the path to the
perl binary is "c:\bin\ActiveState\bin\perl.exe". Then change
the first line to:
-
#!c:/bin/activestate/bin/perl
Invocation
For single-frame mode, invoke the script without arguments. For
two-frame mode, invoke with ?render=topFrame argument. For example,
http://localhost/cgi-bin/javadoc-search.cgi or
http://localhost/cgi-bin/javadoc-search.cgi?render=topFrame.
Credits
Thanks to Eric Thorsen for adapting this script
to Windows platform and testing the search.
Author
Nicholas Sushkin