1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.parse; |
16 |
| |
17 |
| import org.apache.hivemind.Resource; |
18 |
| import org.apache.hivemind.impl.MessageFormatter; |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| class ParseMessages |
27 |
| { |
28 |
| protected static MessageFormatter _formatter = new MessageFormatter(ParseMessages.class, |
29 |
| "ParseStrings"); |
30 |
| |
31 |
1
| static String commentNotEnded(int line)
|
32 |
| { |
33 |
1
| return _formatter.format("comment-not-ended", new Integer(line));
|
34 |
| } |
35 |
| |
36 |
0
| static String unclosedUnknownTag(int line)
|
37 |
| { |
38 |
0
| return _formatter.format("unclosed-unknown-tag", new Integer(line));
|
39 |
| } |
40 |
| |
41 |
1
| static String unclosedTag(String tagName, int line)
|
42 |
| { |
43 |
1
| return _formatter.format("unclosed-tag", tagName, new Integer(line));
|
44 |
| } |
45 |
| |
46 |
1
| static String missingAttributeValue(String tagName, int line, String attributeName)
|
47 |
| { |
48 |
1
| return _formatter.format(
|
49 |
| "missing-attribute-value", |
50 |
| tagName, |
51 |
| new Integer(line), |
52 |
| attributeName); |
53 |
| } |
54 |
| |
55 |
3
| static String componentMayNotBeIgnored(String tagName, int line)
|
56 |
| { |
57 |
3
| return _formatter.format("component-may-not-be-ignored", tagName, new Integer(line));
|
58 |
| } |
59 |
| |
60 |
0
| static String componentIdInvalid(String tagName, int line, String jwcid)
|
61 |
| { |
62 |
0
| return _formatter.format("component-id-invalid", tagName, new Integer(line), jwcid);
|
63 |
| } |
64 |
| |
65 |
1
| static String unknownComponentId(String tagName, int line, String jwcid)
|
66 |
| { |
67 |
1
| return _formatter.format("unknown-component-id", tagName, new Integer(line), jwcid);
|
68 |
| } |
69 |
| |
70 |
1
| static String nestedIgnore(String tagName, int line)
|
71 |
| { |
72 |
1
| return _formatter.format("nested-ignore", tagName, new Integer(line));
|
73 |
| } |
74 |
| |
75 |
1
| static String contentBlockMayNotBeIgnored(String tagName, int line)
|
76 |
| { |
77 |
1
| return _formatter.format("content-block-may-not-be-ignored", tagName, new Integer(line));
|
78 |
| } |
79 |
| |
80 |
0
| static String contentBlockMayNotBeEmpty(String tagName, int line)
|
81 |
| { |
82 |
0
| return _formatter.format("content-block-may-not-be-empty", tagName, new Integer(line));
|
83 |
| } |
84 |
| |
85 |
1
| static String incompleteCloseTag(int line)
|
86 |
| { |
87 |
1
| return _formatter.format("incomplete-close-tag", new Integer(line));
|
88 |
| } |
89 |
| |
90 |
1
| static String improperlyNestedCloseTag(String tagName, int closeLine, String startTagName,
|
91 |
| int startLine) |
92 |
| { |
93 |
1
| return _formatter.format("improperly-nested-close-tag", new Object[]
|
94 |
| { tagName, new Integer(closeLine), startTagName, new Integer(startLine) }); |
95 |
| } |
96 |
| |
97 |
1
| static String unmatchedCloseTag(String tagName, int line)
|
98 |
| { |
99 |
1
| return _formatter.format("unmatched-close-tag", tagName, new Integer(line));
|
100 |
| } |
101 |
| |
102 |
0
| static String failConvertBoolean(String value)
|
103 |
| { |
104 |
0
| return _formatter.format("fail-convert-boolean", value);
|
105 |
| } |
106 |
| |
107 |
0
| static String failConvertDouble(String value)
|
108 |
| { |
109 |
0
| return _formatter.format("fail-convert-double", value);
|
110 |
| } |
111 |
| |
112 |
0
| static String failConvertInt(String value)
|
113 |
| { |
114 |
0
| return _formatter.format("fail-convert-int", value);
|
115 |
| } |
116 |
| |
117 |
0
| static String failConvertLong(String value)
|
118 |
| { |
119 |
0
| return _formatter.format("fail-convert-long", value);
|
120 |
| } |
121 |
| |
122 |
1
| static String unableToCopy(String id)
|
123 |
| { |
124 |
1
| return _formatter.format("unable-to-copy", id);
|
125 |
| } |
126 |
| |
127 |
1
| static String bothTypeAndCopyOf(String id)
|
128 |
| { |
129 |
1
| return _formatter.format("both-type-and-copy-of", id);
|
130 |
| } |
131 |
| |
132 |
1
| static String missingTypeOrCopyOf(String id)
|
133 |
| { |
134 |
1
| return _formatter.format("missing-type-or-copy-of", id);
|
135 |
| } |
136 |
| |
137 |
1
| static String frameworkLibraryIdIsReserved(String id)
|
138 |
| { |
139 |
1
| return _formatter.format("framework-library-id-is-reserved", id);
|
140 |
| } |
141 |
| |
142 |
1
| static String incorrectDocumentType(String expected, String actual)
|
143 |
| { |
144 |
1
| return _formatter.format("incorrect-document-type", expected, actual);
|
145 |
| } |
146 |
| |
147 |
1
| static String noAttributeAndBody(String attributeName, String elementName)
|
148 |
| { |
149 |
1
| return _formatter.format("no-attribute-and-body", attributeName, elementName);
|
150 |
| } |
151 |
| |
152 |
1
| static String requiredExtendedAttribute(String elementName, String attributeName)
|
153 |
| { |
154 |
1
| return _formatter.format("required-extended-attribute", elementName, attributeName);
|
155 |
| } |
156 |
| |
157 |
7
| static String invalidAttribute(String key, String value)
|
158 |
| { |
159 |
7
| return _formatter.format(key, value);
|
160 |
| } |
161 |
| |
162 |
0
| static String missingResource(Resource resource)
|
163 |
| { |
164 |
0
| return _formatter.format("missing-resource", resource);
|
165 |
| } |
166 |
| |
167 |
16
| static String errorReadingResource(Resource resource, Throwable cause)
|
168 |
| { |
169 |
16
| return _formatter.format("error-reading-resource", resource, cause);
|
170 |
| } |
171 |
| |
172 |
1
| static String unknownPublicId(Resource resource, String publicId)
|
173 |
| { |
174 |
1
| return _formatter.format("unknown-public-id", resource, publicId);
|
175 |
| } |
176 |
| |
177 |
1
| static String serviceElementNotSupported()
|
178 |
| { |
179 |
1
| return _formatter.getMessage("service-element-not-supported");
|
180 |
| } |
181 |
| |
182 |
0
| static String rangeError(TemplateToken token, int length)
|
183 |
| { |
184 |
0
| return _formatter.format("range-error", token, new Integer(length));
|
185 |
| } |
186 |
| } |