@Test public void testTransformIgnoresProtectedContent() throws Exception { String expected = "beginDocument\n" + "beginMacroMarkerStandalone [code] []\n" + "onSpecialSymbol [:]\n" + "onSpecialSymbol [)]\n" + "endMacroMarkerStandalone [code] []\n" + "endDocument"; XDOM xdom = new XDOM(Arrays.asList((Block) new MacroMarkerBlock("code", Collections.<String, String>emptyMap(), Arrays.asList((Block) new SpecialSymbolBlock(':'), new SpecialSymbolBlock(')')), false))); getMockedComponent().transform(xdom, new TransformationContext()); WikiPrinter printer = new DefaultWikiPrinter(); BlockRenderer eventBlockRenderer = getComponentManager().getInstance(BlockRenderer.class, "event/1.0"); eventBlockRenderer.render(xdom, printer); Assert.assertEquals(expected, printer.toString()); }
@Override public void transform(Block source, TransformationContext context) throws TransformationException { List<Block> filteredBlocks = this.filter.filter(source.getChildren()); if (!this.mappingTree.getChildren().isEmpty() && !filteredBlocks.isEmpty()) { parseTree(filteredBlocks); } }
IconTransformation extends AbstractTransformation implements Initializable { @Override public void transform(Block source, TransformationContext context) throws TransformationException { List<Block> filteredBlocks = this.filter.filter(source.getChildren()); if (!this.mappingTree.getChildren().isEmpty() && !filteredBlocks.isEmpty()) { parseTree(filteredBlocks); } } }
IconTransformation extends AbstractTransformation implements Initializable { @Override public void transform(Block source, TransformationContext context) throws TransformationException { List<Block> filteredBlocks = this.filter.filter(source.getChildren()); if (!this.mappingTree.getChildren().isEmpty() && !filteredBlocks.isEmpty()) { parseTree(filteredBlocks); } }  }
IconTransformation extends AbstractTransformation implements Initializable { @Override public void transform(Block source, TransformationContext context) throws TransformationException { List<Block> filteredBlocks = this.filter.filter(source.getChildren()); if (!this.mappingTree.getChildren().isEmpty() && !filteredBlocks.isEmpty()) { parseTree(filteredBlocks); } }  @Override void initialize(); @Override void transform(Block source, TransformationContext context); }
IconTransformation extends AbstractTransformation implements Initializable { @Override public void transform(Block source, TransformationContext context) throws TransformationException { List<Block> filteredBlocks = this.filter.filter(source.getChildren()); if (!this.mappingTree.getChildren().isEmpty() && !filteredBlocks.isEmpty()) { parseTree(filteredBlocks); } }  @Override void initialize(); @Override void transform(Block source, TransformationContext context);  }