org.eclipse.mylyn.wikitext.twiki.core
Class TWikiLanguage

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage
      extended by org.eclipse.mylyn.wikitext.core.parser.markup.AbstractMarkupLanguage
          extended by org.eclipse.mylyn.wikitext.twiki.core.TWikiLanguage
All Implemented Interfaces:
Cloneable

public class TWikiLanguage
extends AbstractMarkupLanguage

a markup language implementing TWiki syntax. See TWiki Formatting Rules for details.

Since:
1.0
Author:
David Green

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage
MarkupLanguage.PatternBasedSyntax
 
Field Summary
 
Fields inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.AbstractMarkupLanguage
blocks, paragraphBreakingBlocks, phraseModifierSyntax, tokenSyntax
 
Fields inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage
configuration, internalLinkPattern
 
Constructor Summary
TWikiLanguage()
           
 
Method Summary
protected  void addStandardBlocks(List<Block> blocks, List<Block> paragraphBreakingBlocks)
           
protected  void addStandardPhraseModifiers(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)
           
protected  void addStandardTokens(MarkupLanguage.PatternBasedSyntax tokenSyntax)
           
protected  void clearLanguageSyntax()
           
 boolean computeInternalLinkExists(String link)
          for the purpose of converting wiki words into links, determine if the wiki word exists.
protected  Block createParagraphBlock()
           
 String getIconPattern()
          the pattern to use when generating icon image urls.
protected  MarkupLanguage.PatternBasedSyntax getPhraseModifierSyntax()
           
protected  MarkupLanguage.PatternBasedSyntax getReplacementTokenSyntax()
           
 boolean isAutoLinking()
           
 boolean isLiteralMode()
          indicate if we're currently processing a literal block
 void setAutoLinking(boolean isAutoLinking)
           
 void setIconPattern(String iconPattern)
          the pattern to use when generating icon image urls.
 void setLiteralMode(boolean literalMode)
          indicate if we're currently processing a literal block
 String toIconUrl(String iconType)
           
 String toInternalHref(String pageName)
          Convert a page name to an href to the page.
 
Methods inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.AbstractMarkupLanguage
addBlockExtensions, addPhraseModifierExtensions, addTokenExtensions, getBlocks, getParagraphBreakingBlocks, initializeBlocks, initializePhraseModifiers, initializeSyntax, initializeTokens
 
Methods inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage
clone, configure, createState, emitMarkupLine, emitMarkupLine, emitMarkupText, getExtendsLanguage, getIdGenerationStrategy, getInternalLinkPattern, getName, isBlocksOnly, isDetectingRawHyperlinks, isEmptyLine, isEnableMacros, isFilterGenerativeContents, processContent, setBlocksOnly, setEnableMacros, setExtendsLanguage, setFilterGenerativeContents, setInternalLinkPattern, setName, startBlock
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWikiLanguage

public TWikiLanguage()
Method Detail

getPhraseModifierSyntax

protected MarkupLanguage.PatternBasedSyntax getPhraseModifierSyntax()
Overrides:
getPhraseModifierSyntax in class AbstractMarkupLanguage

getReplacementTokenSyntax

protected MarkupLanguage.PatternBasedSyntax getReplacementTokenSyntax()
Overrides:
getReplacementTokenSyntax in class AbstractMarkupLanguage

clearLanguageSyntax

protected void clearLanguageSyntax()
Overrides:
clearLanguageSyntax in class AbstractMarkupLanguage

computeInternalLinkExists

public boolean computeInternalLinkExists(String link)
for the purpose of converting wiki words into links, determine if the wiki word exists.

See Also:
WikiWordReplacementToken

toInternalHref

public String toInternalHref(String pageName)
Convert a page name to an href to the page.

Parameters:
pageName - the name of the page to target, usually a WikiWord with whitespace removed
Returns:
the href to access the page
See Also:
#getInternalPageHrefPrefix()

toIconUrl

public String toIconUrl(String iconType)

isLiteralMode

public boolean isLiteralMode()
indicate if we're currently processing a literal block

See Also:
LiteralBlock

setLiteralMode

public void setLiteralMode(boolean literalMode)
indicate if we're currently processing a literal block

See Also:
LiteralBlock

setIconPattern

public void setIconPattern(String iconPattern)
the pattern to use when generating icon image urls.


getIconPattern

public String getIconPattern()
the pattern to use when generating icon image urls.


isAutoLinking

public boolean isAutoLinking()

setAutoLinking

public void setAutoLinking(boolean isAutoLinking)

addStandardBlocks

protected void addStandardBlocks(List<Block> blocks,
                                 List<Block> paragraphBreakingBlocks)
Specified by:
addStandardBlocks in class AbstractMarkupLanguage

addStandardPhraseModifiers

protected void addStandardPhraseModifiers(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)
Specified by:
addStandardPhraseModifiers in class AbstractMarkupLanguage

addStandardTokens

protected void addStandardTokens(MarkupLanguage.PatternBasedSyntax tokenSyntax)
Specified by:
addStandardTokens in class AbstractMarkupLanguage

createParagraphBlock

protected Block createParagraphBlock()
Specified by:
createParagraphBlock in class AbstractMarkupLanguage


Copyright © 2011 FuseSource, Corp.. All Rights Reserved.