org.eclipse.mylyn.wikitext.core.parser.markup
Class AbstractMarkupLanguage

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage
      extended by org.eclipse.mylyn.wikitext.core.parser.markup.AbstractMarkupLanguage
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AbstractMediaWikiLanguage, ConfluenceLanguage, TextileLanguage, TracWikiLanguage, TWikiLanguage

public abstract class AbstractMarkupLanguage
extends MarkupLanguage

a standard implementation of a markup language usually extends this class, which provides default support for common functionality.

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
protected  List<Block> blocks
           
protected  List<Block> paragraphBreakingBlocks
           
protected  MarkupLanguage.PatternBasedSyntax phraseModifierSyntax
           
protected  MarkupLanguage.PatternBasedSyntax tokenSyntax
           
 
Fields inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage
configuration, internalLinkPattern
 
Constructor Summary
AbstractMarkupLanguage()
           
 
Method Summary
protected  void addBlockExtensions(List<Block> blocks, List<Block> paragraphBreakingBlocks)
          subclasses may override this method to add blocks to the language.
protected  void addPhraseModifierExtensions(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)
          subclasses may override this method to add phrases to the language.
protected abstract  void addStandardBlocks(List<Block> blocks, List<Block> paragraphBreakingBlocks)
           
protected abstract  void addStandardPhraseModifiers(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)
           
protected abstract  void addStandardTokens(MarkupLanguage.PatternBasedSyntax tokenSyntax)
           
protected  void addTokenExtensions(MarkupLanguage.PatternBasedSyntax tokenSyntax)
          subclasses may override this method to add tokens to the language.
protected  void clearLanguageSyntax()
           
protected abstract  Block createParagraphBlock()
           
 List<Block> getBlocks()
           
 List<Block> getParagraphBreakingBlocks()
           
protected  MarkupLanguage.PatternBasedSyntax getPhraseModifierSyntax()
           
protected  MarkupLanguage.PatternBasedSyntax getReplacementTokenSyntax()
           
protected  void initializeBlocks()
           
protected  void initializePhraseModifiers()
           
protected  void initializeSyntax()
          initialize the syntax of the markup language.
protected  void 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
 

Field Detail

blocks

protected List<Block> blocks

paragraphBreakingBlocks

protected List<Block> paragraphBreakingBlocks

tokenSyntax

protected MarkupLanguage.PatternBasedSyntax tokenSyntax

phraseModifierSyntax

protected MarkupLanguage.PatternBasedSyntax phraseModifierSyntax
Constructor Detail

AbstractMarkupLanguage

public AbstractMarkupLanguage()
Method Detail

getPhraseModifierSyntax

protected MarkupLanguage.PatternBasedSyntax getPhraseModifierSyntax()
Specified by:
getPhraseModifierSyntax in class MarkupLanguage

getReplacementTokenSyntax

protected MarkupLanguage.PatternBasedSyntax getReplacementTokenSyntax()
Specified by:
getReplacementTokenSyntax in class MarkupLanguage

getBlocks

public final List<Block> getBlocks()
Specified by:
getBlocks in class MarkupLanguage

getParagraphBreakingBlocks

public final List<Block> getParagraphBreakingBlocks()

initializeSyntax

protected final void initializeSyntax()
Description copied from class: MarkupLanguage
initialize the syntax of the markup language.

Specified by:
initializeSyntax in class MarkupLanguage

clearLanguageSyntax

protected void clearLanguageSyntax()

initializeTokens

protected final void initializeTokens()

initializePhraseModifiers

protected final void initializePhraseModifiers()

initializeBlocks

protected final void initializeBlocks()

addStandardTokens

protected abstract void addStandardTokens(MarkupLanguage.PatternBasedSyntax tokenSyntax)

addStandardPhraseModifiers

protected abstract void addStandardPhraseModifiers(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)

addStandardBlocks

protected abstract void addStandardBlocks(List<Block> blocks,
                                          List<Block> paragraphBreakingBlocks)

createParagraphBlock

protected abstract Block createParagraphBlock()

addBlockExtensions

protected void addBlockExtensions(List<Block> blocks,
                                  List<Block> paragraphBreakingBlocks)
subclasses may override this method to add blocks to the language. Overriding classes should call super.addBlockExtensions(blocks,paragraphBreakingBlocks) if the default language extensions are desired.

Parameters:
blocks - the list of blocks to which extensions may be added
paragraphBreakingBlocks - the list of blocks that end a paragraph

addTokenExtensions

protected void addTokenExtensions(MarkupLanguage.PatternBasedSyntax tokenSyntax)
subclasses may override this method to add tokens to the language. Overriding classes should call super.addTokenExtensions(tokenSyntax) if the default language extensions are desired.

Parameters:
tokenSyntax - the token syntax

addPhraseModifierExtensions

protected void addPhraseModifierExtensions(MarkupLanguage.PatternBasedSyntax phraseModifierSyntax)
subclasses may override this method to add phrases to the language. Overriding classes should call super.addPhraseModifierExtensions(phraseModifierSyntax) if the default language extensions are desired.

Parameters:
phraseModifierSyntax - the phrase modifier syntax


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