/** * {@inheritDoc} * * @see org.xwiki.rendering.block.AbstractFatherBlock#before(org.xwiki.rendering.listener.Listener) */ public void before(Listener listener) { listener.beginMacroMarker(getName(), getParameters(), getContent(), isInline()); }
/** * {@inheritDoc} * * @see org.xwiki.rendering.block.AbstractFatherBlock#after(org.xwiki.rendering.listener.Listener) */ public void after(Listener listener) { listener.endMacroMarker(getName(), getParameters(), getContent(), isInline()); } }
/** * Indicate if the provided macro is an include macro with the provided included document. * * @param parentMacro the macro block to check * @param completeReference the document reference to compare to * @return true if the documents are the same */ // TODO: Add support for any kind of macro including content linked to a reference private boolean isRecursive(MacroMarkerBlock parentMacro, EntityReference completeReference) { if (parentMacro.getId().equals("include")) { IncludeMacroParameters macroParameters = getParameters(parentMacro.getParameters()); return completeReference.equals(this.macroEntityReferenceResolver.resolve(macroParameters.getReference(), macroParameters.getType(), parentMacro)); } return false; }