public
Description: A Scala source code browser
Homepage:
Clone URL: git://github.com/harrah/browse.git
browse /
name age message
file .gitignore Wed Apr 22 05:25:39 -0700 2009 Nathan's patches for using jQuery [harrah]
file LICENSE Sat Apr 11 10:15:37 -0700 2009 Added LICENSE [harrah]
file README Sat Aug 01 19:21:02 -0700 2009 Update to work with August 1, 2009 nightly buil... [harrah]
directory project/ Tue Oct 13 18:06:28 -0700 2009 Bump sbt version and remove 2.8.0-SNAPSHOT sinc... [harrah]
directory src/ Thu Sep 03 07:26:34 -0700 2009 Bring 2.7.x compatibility back after the 2.8 co... [harrah]
README
Browsable Scala source code in HTML with:
- syntax highlighting
- types/applied implicits in tooltips
- references/definition highlighted on mouseover
- links to definition

See http://harrah.github.com/browse/samples/index.html for samples.

Still in development.  Bugs are features and features are accidental.

To build with sbt (see http://code.google.com/p/simple-build-tool/wiki/Setup for setup instructions):

$ sbt "+update" "+package"

This produces a compiler plugin in target/.

Usage

Add the following options to your compile command for your project:
  -Xplugin:<path-to-sxr>/sxr-0.2.1.jar
  -P:sxr:base-directory:<src-dir>

If you are using sbt, make your project definition extend AutoCompilerPlugins, add sxr as a plugin, and configure the 
plugin:

class YourProject(info: ProjectInfo) extends DefaultProject(info) with AutoCompilerPlugins
{
  val sxr = compilerPlugin("org.scala-tools.sxr" %% "sxr" % "0.2.1")
  override def compileOptions =
    CompileOption("-P:sxr:base-directory:" + mainScalaSourcePath.asFile.getAbsolutePath) ::
    super.compileOptions.toList
}

You will get a directory <classes-output>.sxr that mirrors the directory structure of your sources relative
to the specified base directory with one HTML file for each source file.  You can make simple
changes to the syntax highlighting in the style.css file in the root output directory.  The linked.js
file implements the highlighting of refererences.