1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.rendering.internal.transformation.macro; |
21 |
|
|
22 |
|
import java.util.Arrays; |
23 |
|
import java.util.Collections; |
24 |
|
import java.util.List; |
25 |
|
|
26 |
|
import javax.inject.Named; |
27 |
|
import javax.inject.Singleton; |
28 |
|
|
29 |
|
import org.xwiki.component.annotation.Component; |
30 |
|
import org.xwiki.rendering.block.Block; |
31 |
|
import org.xwiki.rendering.block.MacroBlock; |
32 |
|
import org.xwiki.rendering.macro.AbstractNoParameterMacro; |
33 |
|
import org.xwiki.rendering.macro.MacroExecutionException; |
34 |
|
import org.xwiki.rendering.transformation.MacroTransformationContext; |
35 |
|
|
36 |
|
@Component |
37 |
|
@Named("testrecursivemacro") |
38 |
|
@Singleton |
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 3 |
Complexity Density: 1 |
|
39 |
|
public class TestRecursiveMacro extends AbstractNoParameterMacro |
40 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
41 |
4 |
public TestRecursiveMacro()... |
42 |
|
{ |
43 |
4 |
super("Recursive Macro"); |
44 |
|
} |
45 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
46 |
0 |
@Override... |
47 |
|
public boolean supportsInlineMode() |
48 |
|
{ |
49 |
0 |
return false; |
50 |
|
} |
51 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
5 |
@Override... |
53 |
|
public List<Block> execute(Object parameters, String content, MacroTransformationContext context) |
54 |
|
throws MacroExecutionException |
55 |
|
{ |
56 |
5 |
return Arrays.asList((Block) new MacroBlock("testrecursivemacro", Collections |
57 |
|
.<String, String>emptyMap(), false)); |
58 |
|
} |
59 |
|
} |