org.tinyjee.maven.dim.sh
Class HighlighterScriptFacade

java.lang.Object
  extended by org.tinyjee.maven.dim.utils.JavaScriptFacade
      extended by org.tinyjee.maven.dim.sh.HighlighterScriptFacade

public class HighlighterScriptFacade
extends JavaScriptFacade

Makes the SyntaxHighlighter from 'http://alexgorbatchev.com/SyntaxHighlighter/' available to Java.

Version:
1.0
Author:
Juergen_Kellerer, 2010-09-03

Field Summary
 
Fields inherited from class org.tinyjee.maven.dim.utils.JavaScriptFacade
context, scope, SCRIPT_ENCODING
 
Constructor Summary
protected HighlighterScriptFacade()
          Constructs a new thread bound HighlighterScriptFacade.
 
Method Summary
protected  void finalize()
          
 Iterable<BrushResolver> getBrushResolvers()
           
 String highlightToHTML(String brushName, String code, Map<String,String> params)
          Highlights the given code using a HTML representation.
 
Methods inherited from class org.tinyjee.maven.dim.utils.JavaScriptFacade
close, compileScript, compileScript, compileScripts, createObject, execute, getFromScope
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighlighterScriptFacade

protected HighlighterScriptFacade()
                           throws IOException
Constructs a new thread bound HighlighterScriptFacade.

Throws:
IOException - In case of the initial scripts needed for the SyntaxHighlighter cannot be loaded.
Method Detail

highlightToHTML

public String highlightToHTML(String brushName,
                              String code,
                              Map<String,String> params)
Highlights the given code using a HTML representation.

Parameters:
brushName - the name of the SyntaxHighlighter brush to use.
code - the code to highlight.
params - the params to pass to the SyntaxHighlighter.
Returns:
the highlighted HTML representation of the code.

getBrushResolvers

public final Iterable<BrushResolver> getBrushResolvers()

finalize

protected void finalize()
                 throws Throwable

Overrides:
finalize in class Object
Throws:
Throwable