public interface IWemListener extends IWemListenerDocument, IWemListenerSimpleBlocks, IWemListenerInline, IWemListenerTable, IWemListenerList, IWemListenerSemantic, IWemListenerProgramming
IWemListenerProvider provider = new MyWemListenerProvider();
provider.registerListener(
IWemListenerDocument.class,
new MyDocumentListener());
...
IWemListenerDocument docListener =
provider.getListener(IWemListenerProvider.class);
if (docListener != null) {
docListener.beginDocument();
}
Adapter-based approach is much more flexible and it can be used to
transparently extend parsers to handle new types of structural elements.beginDocument, beginHeader, beginSection, beginSectionContent, endDocument, endHeader, endSection, endSectionContentbeginInfoBlock, beginParagraph, endInfoBlock, endParagraph, onEmptyLines, onHorizontalLine, onVerbatimBlockbeginFormat, endFormat, onEscape, onImage, onImage, onLineBreak, onNewLine, onReference, onReference, onSpace, onSpecialSymbol, onVerbatimInline, onWordbeginTable, beginTableCell, beginTableRow, endTable, endTableCell, endTableRow, onTableCaptionbeginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginList, beginListItem, beginQuotation, beginQuotationLine, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endList, endListItem, endQuotation, endQuotationLinebeginPropertyBlock, beginPropertyInline, endPropertyBlock, endPropertyInlineonExtensionBlock, onExtensionInline, onMacroBlock, onMacroInlineCopyright © 2004–2016 XWiki. All rights reserved.