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
|
|
private static final MessageFormatter _formatter =
|
29
|
|
new MessageFormatter(ParseMessages.class, "ParseStrings");
|
30
|
|
|
31
|
1
|
public static String commentNotEnded(int line)
|
32
|
|
{
|
33
|
1
|
return _formatter.format("comment-not-ended", new Integer(line));
|
34
|
|
}
|
35
|
|
|
36
|
0
|
public static String unclosedUnknownTag(int line)
|
37
|
|
{
|
38
|
0
|
return _formatter.format("unclosed-unknown-tag", new Integer(line));
|
39
|
|
}
|
40
|
|
|
41
|
1
|
public static String unclosedTag(String tagName, int line)
|
42
|
|
{
|
43
|
1
|
return _formatter.format("unclosed-tag", tagName, new Integer(line));
|
44
|
|
}
|
45
|
|
|
46
|
1
|
public 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
|
public 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
|
public 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
|
public 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
|
public static String nestedIgnore(String tagName, int line)
|
71
|
|
{
|
72
|
1
|
return _formatter.format("nested-ignore", tagName, new Integer(line));
|
73
|
|
}
|
74
|
|
|
75
|
1
|
public 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
|
public 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
|
public static String incompleteCloseTag(int line)
|
86
|
|
{
|
87
|
1
|
return _formatter.format("incomplete-close-tag", new Integer(line));
|
88
|
|
}
|
89
|
|
|
90
|
1
|
public static String improperlyNestedCloseTag(
|
91
|
|
String tagName,
|
92
|
|
int closeLine,
|
93
|
|
String startTagName,
|
94
|
|
int startLine)
|
95
|
|
{
|
96
|
1
|
return _formatter.format(
|
97
|
|
"improperly-nested-close-tag",
|
98
|
|
new Object[] { tagName, new Integer(closeLine), startTagName, new Integer(startLine)});
|
99
|
|
}
|
100
|
|
|
101
|
1
|
public static String unmatchedCloseTag(String tagName, int line)
|
102
|
|
{
|
103
|
1
|
return _formatter.format("unmatched-close-tag", tagName, new Integer(line));
|
104
|
|
}
|
105
|
|
|
106
|
0
|
public static String failConvertBoolean(String value)
|
107
|
|
{
|
108
|
0
|
return _formatter.format("fail-convert-boolean", value);
|
109
|
|
}
|
110
|
|
|
111
|
0
|
public static String failConvertDouble(String value)
|
112
|
|
{
|
113
|
0
|
return _formatter.format("fail-convert-double", value);
|
114
|
|
}
|
115
|
|
|
116
|
0
|
public static String failConvertInt(String value)
|
117
|
|
{
|
118
|
0
|
return _formatter.format("fail-convert-int", value);
|
119
|
|
}
|
120
|
|
|
121
|
0
|
public static String failConvertLong(String value)
|
122
|
|
{
|
123
|
0
|
return _formatter.format("fail-convert-long", value);
|
124
|
|
}
|
125
|
|
|
126
|
1
|
public static String unableToCopy(String id)
|
127
|
|
{
|
128
|
1
|
return _formatter.format("unable-to-copy", id);
|
129
|
|
}
|
130
|
|
|
131
|
1
|
public static String bothTypeAndCopyOf(String id)
|
132
|
|
{
|
133
|
1
|
return _formatter.format("both-type-and-copy-of", id);
|
134
|
|
}
|
135
|
|
|
136
|
1
|
public static String missingTypeOrCopyOf(String id)
|
137
|
|
{
|
138
|
1
|
return _formatter.format("missing-type-or-copy-of", id);
|
139
|
|
}
|
140
|
|
|
141
|
1
|
public static String frameworkLibraryIdIsReserved(String id)
|
142
|
|
{
|
143
|
1
|
return _formatter.format("framework-library-id-is-reserved", id);
|
144
|
|
}
|
145
|
|
|
146
|
1
|
public static String incorrectDocumentType(String expected, String actual)
|
147
|
|
{
|
148
|
1
|
return _formatter.format("incorrect-document-type", expected, actual);
|
149
|
|
}
|
150
|
|
|
151
|
1
|
public static String noAttributeAndBody(String attributeName, String elementName)
|
152
|
|
{
|
153
|
1
|
return _formatter.format("no-attribute-and-body", attributeName, elementName);
|
154
|
|
}
|
155
|
|
|
156
|
1
|
public static String requiredExtendedAttribute(String elementName, String attributeName)
|
157
|
|
{
|
158
|
1
|
return _formatter.format("required-extended-attribute", elementName, attributeName);
|
159
|
|
}
|
160
|
|
|
161
|
7
|
public static String invalidAttribute(String key, String value)
|
162
|
|
{
|
163
|
7
|
return _formatter.format(key, value);
|
164
|
|
}
|
165
|
|
|
166
|
0
|
public static String missingResource(Resource resource)
|
167
|
|
{
|
168
|
0
|
return _formatter.format("missing-resource", resource);
|
169
|
|
}
|
170
|
|
|
171
|
17
|
public static String errorReadingResource(Resource resource, Throwable cause)
|
172
|
|
{
|
173
|
17
|
return _formatter.format("error-reading-resource", resource, cause);
|
174
|
|
}
|
175
|
|
|
176
|
1
|
public static String unknownPublicId(Resource resource, String publicId)
|
177
|
|
{
|
178
|
1
|
return _formatter.format("unknown-public-id", resource, publicId);
|
179
|
|
}
|
180
|
|
|
181
|
1
|
public static String serviceElementNotSupported()
|
182
|
|
{
|
183
|
1
|
return _formatter.getMessage("service-element-not-supported");
|
184
|
|
}
|
185
|
|
}
|
186
|
|
|