org.eclipse.mylyn.wikitext.core.parser.markup.block
Class GlossaryBlock

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.parser.markup.Processor
      extended by org.eclipse.mylyn.wikitext.core.parser.markup.Block
          extended by org.eclipse.mylyn.wikitext.core.parser.markup.block.GlossaryBlock
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
TextileGlossaryBlock

public abstract class GlossaryBlock
extends Block

An abstract implementation of a glossary. Emits a definition list containing all terms defined in the document. Subclasses need only define {BlockBlock.canStart(String, int).

Author:
David Green

Field Summary
protected  int blockLineNumber
           
 
Fields inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.Processor
builder, markupLanguage, parser, state
 
Constructor Summary
GlossaryBlock()
           
 
Method Summary
 String getStyle()
          the CSS style of the glossary block
 int processLineContent(String line, int offset)
          Process the given line of markup starting at the provided offset.
 void setClosed(boolean closed)
          Cause the block to be closed.
 void setStyle(String style)
          the CSS style of the glossary block
 
Methods inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.Block
beginNesting, canStart, clone, findCloseOffset, isClosed, processLine
 
Methods inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.Processor
getBuilder, getMarkupLanguage, getParser, getState, setParser, setState
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blockLineNumber

protected int blockLineNumber
Constructor Detail

GlossaryBlock

public GlossaryBlock()
Method Detail

processLineContent

public int processLineContent(String line,
                              int offset)
Description copied from class: Block
Process the given line of markup starting at the provided offset.

Specified by:
processLineContent in class Block
Parameters:
line - the markup line to process
offset - the offset at which to start processing
Returns:
a non-negative integer to indicate that processing of the block completed before the end of the line, or -1 if the entire line was processed.

getStyle

public String getStyle()
the CSS style of the glossary block

Returns:
the style, or null if the style is not defined

setStyle

public void setStyle(String style)
the CSS style of the glossary block

Parameters:
style - the style, or null if the style is not defined

setClosed

public void setClosed(boolean closed)
Description copied from class: Block
Cause the block to be closed. If the block is going from the open to the closed state, then the block must cause the closed state to be propagated to the builder if necessary.

Overrides:
setClosed in class Block


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