1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.rendering.xdomxml10.internal.parser; |
21 |
|
|
22 |
|
import java.util.HashSet; |
23 |
|
import java.util.Set; |
24 |
|
|
25 |
|
import javax.inject.Named; |
26 |
|
|
27 |
|
import org.xml.sax.SAXException; |
28 |
|
import org.xwiki.component.annotation.Component; |
29 |
|
import org.xwiki.component.annotation.InstantiationStrategy; |
30 |
|
import org.xwiki.component.descriptor.ComponentInstantiationStrategy; |
31 |
|
|
32 |
|
@Component |
33 |
|
@Named("macromarker") |
34 |
|
@InstantiationStrategy(ComponentInstantiationStrategy.PER_LOOKUP) |
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
35 |
|
public class MacroMarkerBlockParser extends DefaultBlockParser |
36 |
|
{ |
37 |
|
private static final Set<String> NAMES = new HashSet<String>() |
38 |
|
{ |
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
39 |
0 |
{... |
40 |
0 |
add("id"); |
41 |
0 |
add("content"); |
42 |
0 |
add("inline"); |
43 |
|
} |
44 |
|
}; |
45 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
46 |
0 |
public MacroMarkerBlockParser()... |
47 |
|
{ |
48 |
0 |
super(NAMES); |
49 |
|
} |
50 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
51 |
0 |
@Override... |
52 |
|
protected void beginBlock() throws SAXException |
53 |
|
{ |
54 |
0 |
getListener().beginMacroMarker(getParameterAsString("id", "macro"), getCustomParameters(), |
55 |
|
getParameterAsString("content", null), getParameterAsBoolean("inline", false)); |
56 |
|
} |
57 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
58 |
0 |
@Override... |
59 |
|
protected void endBlock() throws SAXException |
60 |
|
{ |
61 |
0 |
getListener().endMacroMarker(getParameterAsString("id", "macro"), getCustomParameters(), |
62 |
|
getParameterAsString("content", null), getParameterAsBoolean("inline", false)); |
63 |
|
} |
64 |
|
} |