/** * @return the macro name. * @deprecated since 2.4M1 use {@link #getId()} instead */ @Deprecated public String getName() { return getId(); }
/** * @param block the block to test * @return true if the passed block is a protected block or false otherwise */ private boolean isProtectedBlock(Block block) { return (block instanceof MacroMarkerBlock) && ((MacroMarkerBlock) block).getId().equals("code"); } }
for (ListIterator<MacroMarkerBlock> it = footnotes.listIterator(); it.hasNext();) { MacroMarkerBlock macro = it.next(); if (FootnoteMacro.MACRO_NAME.equals(macro.getId())) { continue; } else if (PutFootnotesMacro.MACRO_NAME.equals(macro.getId())) { macro.getParent().replaceChild(Collections.<Block>emptyList(), macro);
/** * 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; }
MacroMarkerBlock parent = context.getCurrentMacroBlock().getParentBlockByType(MacroMarkerBlock.class); while (parent != null) { String parentId = parent.getId(); try { Macro< ? > macro = this.macroManager.getMacro(new MacroId(parentId));
new ClassBlockMatcher(MacroMarkerBlock.class), Block.Axes.ANCESTOR); while (parent != null) { String parentId = parent.getId(); try { Macro< ? > macro = this.macroManager.getMacro(new MacroId(parentId));