com.ecyrd.jspwiki.diff
Class ContextualDiffProvider

java.lang.Object
  extended by com.ecyrd.jspwiki.diff.ContextualDiffProvider
All Implemented Interfaces:
DiffProvider, WikiProvider

public class ContextualDiffProvider
extends Object
implements DiffProvider

A seriously better diff provider, which highlights changes word-by-word using CSS. Suggested by John Volkar.

Author:
John Volkar, Janne Jalkanen, Henning P. Schmiedehausen

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ecyrd.jspwiki.diff.DiffProvider
DiffProvider.NullDiffProvider
 
Field Summary
 String m_alternatingSpaceHtml
           
 String m_changeEndHtml
           
 String m_changeStartHtml
           
 String m_deletionEndHtml
           
 String m_deletionStartHtml
           
 String m_diffEnd
           
 String m_diffStart
           
 String m_elidedHeadIndicatorHtml
           
 String m_elidedTailIndicatorHtml
           
 boolean m_emitChangeNextPreviousHyperlinks
           
 String m_insertionEndHtml
           
 String m_insertionStartHtml
           
 String m_lineBreakHtml
           
static String PROP_UNCHANGED_CONTEXT_LIMIT
           
 
Fields inherited from interface com.ecyrd.jspwiki.WikiProvider
LATEST_VERSION
 
Constructor Summary
ContextualDiffProvider()
           
 
Method Summary
 String getProviderInfo()
          Return a valid HTML string for information.
 void initialize(WikiEngine engine, Properties properties)
          Initializes the page provider.
 String makeDiffHtml(String wikiOld, String wikiNew)
          Do a colored diff of the two regions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_UNCHANGED_CONTEXT_LIMIT

public static final String PROP_UNCHANGED_CONTEXT_LIMIT
See Also:
Constant Field Values

m_emitChangeNextPreviousHyperlinks

public boolean m_emitChangeNextPreviousHyperlinks

m_changeStartHtml

public String m_changeStartHtml

m_changeEndHtml

public String m_changeEndHtml

m_diffStart

public String m_diffStart

m_diffEnd

public String m_diffEnd

m_insertionStartHtml

public String m_insertionStartHtml

m_insertionEndHtml

public String m_insertionEndHtml

m_deletionStartHtml

public String m_deletionStartHtml

m_deletionEndHtml

public String m_deletionEndHtml

m_elidedHeadIndicatorHtml

public String m_elidedHeadIndicatorHtml

m_elidedTailIndicatorHtml

public String m_elidedTailIndicatorHtml

m_lineBreakHtml

public String m_lineBreakHtml

m_alternatingSpaceHtml

public String m_alternatingSpaceHtml
Constructor Detail

ContextualDiffProvider

public ContextualDiffProvider()
Method Detail

getProviderInfo

public String getProviderInfo()
Description copied from interface: WikiProvider
Return a valid HTML string for information. May be anything.

Specified by:
getProviderInfo in interface WikiProvider
See Also:
WikiProvider.getProviderInfo()

initialize

public void initialize(WikiEngine engine,
                       Properties properties)
                throws NoRequiredPropertyException,
                       IOException
Description copied from interface: WikiProvider
Initializes the page provider.

Specified by:
initialize in interface WikiProvider
Throws:
NoRequiredPropertyException
IOException
See Also:
WikiProvider.initialize(com.ecyrd.jspwiki.WikiEngine, java.util.Properties)

makeDiffHtml

public String makeDiffHtml(String wikiOld,
                           String wikiNew)
Do a colored diff of the two regions. This. is. serious. fun. ;-)

Specified by:
makeDiffHtml in interface DiffProvider
See Also:
DiffProvider.makeDiffHtml(java.lang.String, java.lang.String)