use of org.eclipse.mylyn.wikitext.parser.markup.PatternBasedElementProcessor in project mylyn.docs by eclipse.
the class CssClassPhraseModifier method newProcessor.
@Override
protected PatternBasedElementProcessor newProcessor() {
return new PatternBasedElementProcessor() {
@Override
public void emit() {
Attributes attributes = new Attributes();
SpanType span = SpanType.SPAN;
String cssClass = group(1);
if (cssClass != null && !cssClass.isEmpty()) {
attributes.setCssClass(cssClass);
} else {
span = SpanType.MARK;
}
getBuilder().beginSpan(span, attributes);
getBuilder().characters(group(2));
getBuilder().endSpan();
}
};
}
Aggregations