|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mylyn.wikitext.core.parser.markup.Processor
org.eclipse.mylyn.wikitext.core.parser.markup.Block
public abstract class Block
A markup block that may span multiple lines.
Implements Cloneable
for the template design pattern.
Field Summary |
---|
Fields inherited from class org.eclipse.mylyn.wikitext.core.parser.markup.Processor |
---|
builder, markupLanguage, parser, state |
Constructor Summary | |
---|---|
Block()
|
Method Summary | |
---|---|
boolean |
beginNesting()
Indicate if block nesting should begin. |
abstract boolean |
canStart(String line,
int lineOffset)
Indicate if the block can start with the given markup line at the provided offset. |
Block |
clone()
Clone the block including its state. |
int |
findCloseOffset(String line,
int lineOffset)
Indicate if the block can close on the given line at the given offset. |
boolean |
isClosed()
Indicate if the current block is closed |
int |
processLine(String line,
int offset)
Process the given line of markup starting at the provided offset. |
protected abstract 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. |
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 |
Constructor Detail |
---|
public Block()
Method Detail |
---|
public int processLine(String line, int offset)
line
- the markup line to processoffset
- the offset at which to start processing
protected abstract int processLineContent(String line, int offset)
line
- the markup line to processoffset
- the offset at which to start processing
public abstract boolean canStart(String line, int lineOffset)
cloning
and consumed in
#processLine(String, int, int)
. Calling this method must cause any previous state to be reset. Note that
it is valid for block implementations to refuse to start at non-zero offsets.
Implementations must be able to handle this method without having the processor state
initialized.
line
- the line of markup to testlineOffset
- the offset at which the block should start processing
public boolean beginNesting()
processLineContent(String, int)
.
findCloseOffset(String, int)
public int findCloseOffset(String line, int lineOffset)
line
- the line of contentlineOffset
- the 0-based offset into the line
beginNesting()
public boolean isClosed()
public void setClosed(boolean closed)
builder
if necessary.
closed
- public Block clone()
canStart(String, int)
method is
called in order to implement the Template design pattern.
clone
in class Processor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |