1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.wysiwyg.server.internal; |
21 |
|
|
22 |
|
import javax.inject.Inject; |
23 |
|
import javax.inject.Named; |
24 |
|
import javax.inject.Singleton; |
25 |
|
|
26 |
|
import org.xwiki.component.annotation.Component; |
27 |
|
import org.xwiki.component.phase.Initializable; |
28 |
|
import org.xwiki.component.phase.InitializationException; |
29 |
|
import org.xwiki.edit.AbstractTemplateEditor; |
30 |
|
import org.xwiki.edit.Editor; |
31 |
|
import org.xwiki.edit.EditorDescriptor; |
32 |
|
import org.xwiki.edit.EditorDescriptorBuilder; |
33 |
|
import org.xwiki.rendering.syntax.SyntaxContent; |
34 |
|
|
35 |
|
|
36 |
|
@link@link |
37 |
|
|
38 |
|
@version |
39 |
|
@since |
40 |
|
|
41 |
|
@Component |
42 |
|
@Singleton |
43 |
|
@Named(GwtXdomEditor.ROLE_HINT) |
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 3 |
Complexity Density: 1 |
|
44 |
|
public class GwtSyntaxContentEditor extends AbstractTemplateEditor<SyntaxContent> implements Initializable |
45 |
|
{ |
46 |
|
@Inject |
47 |
|
private EditorDescriptorBuilder editorDescriptorBuilder; |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
20 |
@Override... |
50 |
|
public String getTemplateName() |
51 |
|
{ |
52 |
|
|
53 |
20 |
return "editors/xdomWysiwygGwt.vm"; |
54 |
|
} |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
73 |
@Override... |
57 |
|
public EditorDescriptor getDescriptor() |
58 |
|
{ |
59 |
|
|
60 |
73 |
return this.editorDescriptorBuilder.build(); |
61 |
|
} |
62 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
9 |
@Override... |
64 |
|
public void initialize() throws InitializationException |
65 |
|
{ |
66 |
9 |
this.editorDescriptorBuilder.setId(GwtXdomEditor.ROLE_HINT).setCategory("wysiwyg"); |
67 |
|
} |
68 |
|
} |