public abstract class PatternBasedElementProcessor extends Processor implements Matcher
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Integer,org.eclipse.mylyn.wikitext.core.parser.markup.PatternBasedElementProcessor.Group> |
groupByIndex |
protected int |
lineEndOffset |
protected int |
lineStartOffset |
builder, markupLanguage, parser, state
Constructor and Description |
---|
PatternBasedElementProcessor() |
Modifier and Type | Method and Description |
---|---|
abstract void |
emit()
Emit the content of the element
|
int |
end(int groupNumber)
Get the end offset of a capturing group, or -1 if the group did not match any text.
|
int |
getLineEndOffset()
Get the offset within the line at which this element ended
|
int |
getLineStartOffset()
Get the offset within the line at which this element was started
|
java.lang.String |
group(int groupNumber)
Get the capturing group text, or null if the group did not match any text.
|
void |
setGroup(int group,
java.lang.String capturedText,
int start,
int end)
Set the captured text for the given group.
|
void |
setLineEndOffset(int lineEndOffset) |
void |
setLineStartOffset(int lineStartOffset) |
int |
start(int groupNumber)
Get the start offset of a capturing group, or -1 if the group did not match any text.
|
clone, getBuilder, getMarkupLanguage, getParser, getState, setParser, setState
protected int lineStartOffset
protected int lineEndOffset
protected java.util.Map<java.lang.Integer,org.eclipse.mylyn.wikitext.core.parser.markup.PatternBasedElementProcessor.Group> groupByIndex
public void setGroup(int group, java.lang.String capturedText, int start, int end)
group
- the 1-based groupcapturedText
- the text that was capturedgroup(int)
public int getLineStartOffset()
Matcher.start()
public void setLineStartOffset(int lineStartOffset)
public int getLineEndOffset()
Matcher.end()
public void setLineEndOffset(int lineEndOffset)
public java.lang.String group(int groupNumber)
public int start(int groupNumber)
public int end(int groupNumber)
public abstract void emit()
Copyright © 2007, 2013 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html