| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.error; | 4 library engine.error; |
| 5 | 5 |
| 6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
| 7 import 'source.dart'; | 7 import 'source.dart'; |
| 8 import 'scanner.dart' show Token; | 8 import 'scanner.dart' show Token; |
| 9 import 'ast.dart' show ASTNode; | 9 import 'ast.dart' show ASTNode; |
| 10 import 'element.dart' show Element; | 10 import 'element.dart' show Element; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 * @return `true` if an error has been reported to this listener | 127 * @return `true` if an error has been reported to this listener |
| 128 */ | 128 */ |
| 129 bool get errorReported => _errorReported; | 129 bool get errorReported => _errorReported; |
| 130 | 130 |
| 131 void onError(AnalysisError error) { | 131 void onError(AnalysisError error) { |
| 132 _errorReported = true; | 132 _errorReported = true; |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 | 135 |
| 136 /** | 136 /** |
| 137 * The enumeration `AngularCode` defines Angular specific problems. |
| 138 */ |
| 139 class AngularCode extends Enum<AngularCode> implements ErrorCode { |
| 140 static final AngularCode CANNOT_PARSE_SELECTOR = new AngularCode.con1('CANNOT_
PARSE_SELECTOR', 0, "The selector '%s' cannot be parsed"); |
| 141 |
| 142 static final AngularCode EXPECTED_IDENTIFIER = new AngularCode.con1('EXPECTED_
IDENTIFIER', 1, "Expected an identifier"); |
| 143 |
| 144 static final AngularCode EXPECTED_IN = new AngularCode.con1('EXPECTED_IN', 2,
"Expected 'in' keyword"); |
| 145 |
| 146 static final AngularCode INVALID_PROPERTY_KIND = new AngularCode.con1('INVALID
_PROPERTY_KIND', 3, "Unknown property binding kind '%s', use one of the '@', '=>
', '=>!' or '<=>'"); |
| 147 |
| 148 static final AngularCode INVALID_PROPERTY_FIELD = new AngularCode.con1('INVALI
D_PROPERTY_FIELD', 4, "Unknown property field '%s'"); |
| 149 |
| 150 static final AngularCode INVALID_PROPERTY_MAP = new AngularCode.con1('INVALID_
PROPERTY_MAP', 5, "Argument 'map' must be a constant map literal"); |
| 151 |
| 152 static final AngularCode INVALID_PROPERTY_NAME = new AngularCode.con1('INVALID
_PROPERTY_NAME', 6, "Property name must be a string literal"); |
| 153 |
| 154 static final AngularCode INVALID_PROPERTY_SPEC = new AngularCode.con1('INVALID
_PROPERTY_SPEC', 7, "Property binding specification must be a string literal"); |
| 155 |
| 156 static final AngularCode MISSING_CSS_URL = new AngularCode.con1('MISSING_CSS_U
RL', 8, "Argument 'cssUrl' must be provided"); |
| 157 |
| 158 static final AngularCode MISSING_NAME = new AngularCode.con1('MISSING_NAME', 9
, "Argument 'name' must be provided"); |
| 159 |
| 160 static final AngularCode MISSING_PUBLISH_AS = new AngularCode.con1('MISSING_PU
BLISH_AS', 10, "Argument 'publishAs' must be provided"); |
| 161 |
| 162 static final AngularCode MISSING_TEMPLATE_URL = new AngularCode.con1('MISSING_
TEMPLATE_URL', 11, "Argument 'templateUrl' must be provided"); |
| 163 |
| 164 static final AngularCode MISSING_SELECTOR = new AngularCode.con1('MISSING_SELE
CTOR', 12, "Argument 'selector' must be provided"); |
| 165 |
| 166 static final List<AngularCode> values = [ |
| 167 CANNOT_PARSE_SELECTOR, |
| 168 EXPECTED_IDENTIFIER, |
| 169 EXPECTED_IN, |
| 170 INVALID_PROPERTY_KIND, |
| 171 INVALID_PROPERTY_FIELD, |
| 172 INVALID_PROPERTY_MAP, |
| 173 INVALID_PROPERTY_NAME, |
| 174 INVALID_PROPERTY_SPEC, |
| 175 MISSING_CSS_URL, |
| 176 MISSING_NAME, |
| 177 MISSING_PUBLISH_AS, |
| 178 MISSING_TEMPLATE_URL, |
| 179 MISSING_SELECTOR]; |
| 180 |
| 181 /** |
| 182 * The template used to create the message to be displayed for this error. |
| 183 */ |
| 184 final String message; |
| 185 |
| 186 /** |
| 187 * The template used to create the correction to be displayed for this error,
or `null` if |
| 188 * there is no correction information for this error. |
| 189 */ |
| 190 String correction2; |
| 191 |
| 192 /** |
| 193 * Initialize a newly created error code to have the given message. |
| 194 * |
| 195 * @param message the message template used to create the message to be displa
yed for the error |
| 196 */ |
| 197 AngularCode.con1(String name, int ordinal, this.message) : super(name, ordinal
); |
| 198 |
| 199 /** |
| 200 * Initialize a newly created error code to have the given message and correct
ion. |
| 201 * |
| 202 * @param message the template used to create the message to be displayed for
the error |
| 203 * @param correction the template used to create the correction to be displaye
d for the error |
| 204 */ |
| 205 AngularCode.con2(String name, int ordinal, this.message, String correction) :
super(name, ordinal) { |
| 206 this.correction2 = correction; |
| 207 } |
| 208 |
| 209 String get correction => correction2; |
| 210 |
| 211 ErrorSeverity get errorSeverity => ErrorType.TOOLKIT.severity; |
| 212 |
| 213 ErrorType get type => ErrorType.TOOLKIT; |
| 214 } |
| 215 |
| 216 /** |
| 137 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to | 217 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to |
| 138 * create the errors being reported. | 218 * create the errors being reported. |
| 139 * | 219 * |
| 140 * @coverage dart.engine.error | 220 * @coverage dart.engine.error |
| 141 */ | 221 */ |
| 142 class ErrorReporter { | 222 class ErrorReporter { |
| 143 /** | 223 /** |
| 144 * The error listener to which errors will be reported. | 224 * The error listener to which errors will be reported. |
| 145 */ | 225 */ |
| 146 AnalysisErrorListener _errorListener; | 226 AnalysisErrorListener _errorListener; |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 | 763 |
| 684 /** | 764 /** |
| 685 * The template used to create the message to be displayed for this error. | 765 * The template used to create the message to be displayed for this error. |
| 686 */ | 766 */ |
| 687 final String message; | 767 final String message; |
| 688 | 768 |
| 689 /** | 769 /** |
| 690 * The template used to create the correction to be displayed for this error,
or `null` if | 770 * The template used to create the correction to be displayed for this error,
or `null` if |
| 691 * there is no correction information for this error. | 771 * there is no correction information for this error. |
| 692 */ | 772 */ |
| 693 String correction3; | 773 String correction4; |
| 694 | 774 |
| 695 /** | 775 /** |
| 696 * Initialize a newly created error code to have the given message. | 776 * Initialize a newly created error code to have the given message. |
| 697 * | 777 * |
| 698 * @param message the message template used to create the message to be displa
yed for the error | 778 * @param message the message template used to create the message to be displa
yed for the error |
| 699 */ | 779 */ |
| 700 HintCode.con1(String name, int ordinal, this.message) : super(name, ordinal); | 780 HintCode.con1(String name, int ordinal, this.message) : super(name, ordinal); |
| 701 | 781 |
| 702 /** | 782 /** |
| 703 * Initialize a newly created error code to have the given message and correct
ion. | 783 * Initialize a newly created error code to have the given message and correct
ion. |
| 704 * | 784 * |
| 705 * @param message the template used to create the message to be displayed for
the error | 785 * @param message the template used to create the message to be displayed for
the error |
| 706 * @param correction the template used to create the correction to be displaye
d for the error | 786 * @param correction the template used to create the correction to be displaye
d for the error |
| 707 */ | 787 */ |
| 708 HintCode.con2(String name, int ordinal, this.message, String correction) : sup
er(name, ordinal) { | 788 HintCode.con2(String name, int ordinal, this.message, String correction) : sup
er(name, ordinal) { |
| 709 this.correction3 = correction; | 789 this.correction4 = correction; |
| 710 } | 790 } |
| 711 | 791 |
| 712 String get correction => correction3; | 792 String get correction => correction4; |
| 713 | 793 |
| 714 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; | 794 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
| 715 | 795 |
| 716 ErrorType get type => ErrorType.HINT; | 796 ErrorType get type => ErrorType.HINT; |
| 717 } | 797 } |
| 718 | 798 |
| 719 /** | 799 /** |
| 720 * The interface `ErrorCode` defines the behavior common to objects representing
error codes | 800 * The interface `ErrorCode` defines the behavior common to objects representing
error codes |
| 721 * associated with [AnalysisError]. | 801 * associated with [AnalysisError]. |
| 722 * | 802 * |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 * Many, but not all, static warnings relate to types, in which case they are
known as static type | 878 * Many, but not all, static warnings relate to types, in which case they are
known as static type |
| 799 * warnings. | 879 * warnings. |
| 800 */ | 880 */ |
| 801 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 5, ErrorSeverity.WARNING); | 881 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN
G', 5, ErrorSeverity.WARNING); |
| 802 | 882 |
| 803 /** | 883 /** |
| 804 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. | 884 * Syntactic errors are errors produced as a result of input that does not con
form to the grammar. |
| 805 */ | 885 */ |
| 806 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 6, E
rrorSeverity.ERROR); | 886 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 6, E
rrorSeverity.ERROR); |
| 807 | 887 |
| 888 /** |
| 889 * Toolkit specific semantic problems. |
| 890 */ |
| 891 static final ErrorType TOOLKIT = new ErrorType('TOOLKIT', 7, ErrorSeverity.INF
O); |
| 892 |
| 808 static final List<ErrorType> values = [ | 893 static final List<ErrorType> values = [ |
| 809 TODO, | 894 TODO, |
| 810 HINT, | 895 HINT, |
| 811 COMPILE_TIME_ERROR, | 896 COMPILE_TIME_ERROR, |
| 812 PUB_SUGGESTION, | 897 PUB_SUGGESTION, |
| 813 STATIC_WARNING, | 898 STATIC_WARNING, |
| 814 STATIC_TYPE_WARNING, | 899 STATIC_TYPE_WARNING, |
| 815 SYNTACTIC_ERROR]; | 900 SYNTACTIC_ERROR, |
| 901 TOOLKIT]; |
| 816 | 902 |
| 817 /** | 903 /** |
| 818 * The severity of this type of error. | 904 * The severity of this type of error. |
| 819 */ | 905 */ |
| 820 final ErrorSeverity severity; | 906 final ErrorSeverity severity; |
| 821 | 907 |
| 822 /** | 908 /** |
| 823 * Initialize a newly created error type to have the given severity. | 909 * Initialize a newly created error type to have the given severity. |
| 824 * | 910 * |
| 825 * @param severity the severity of this type of error | 911 * @param severity the severity of this type of error |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2147 | 2233 |
| 2148 /** | 2234 /** |
| 2149 * The template used to create the message to be displayed for this error. | 2235 * The template used to create the message to be displayed for this error. |
| 2150 */ | 2236 */ |
| 2151 final String message; | 2237 final String message; |
| 2152 | 2238 |
| 2153 /** | 2239 /** |
| 2154 * The template used to create the correction to be displayed for this error,
or `null` if | 2240 * The template used to create the correction to be displayed for this error,
or `null` if |
| 2155 * there is no correction information for this error. | 2241 * there is no correction information for this error. |
| 2156 */ | 2242 */ |
| 2157 String correction2; | 2243 String correction3; |
| 2158 | 2244 |
| 2159 /** | 2245 /** |
| 2160 * Initialize a newly created error code to have the given message. | 2246 * Initialize a newly created error code to have the given message. |
| 2161 * | 2247 * |
| 2162 * @param message the message template used to create the message to be displa
yed for the error | 2248 * @param message the message template used to create the message to be displa
yed for the error |
| 2163 */ | 2249 */ |
| 2164 CompileTimeErrorCode.con1(String name, int ordinal, this.message) : super(name
, ordinal); | 2250 CompileTimeErrorCode.con1(String name, int ordinal, this.message) : super(name
, ordinal); |
| 2165 | 2251 |
| 2166 /** | 2252 /** |
| 2167 * Initialize a newly created error code to have the given message and correct
ion. | 2253 * Initialize a newly created error code to have the given message and correct
ion. |
| 2168 * | 2254 * |
| 2169 * @param message the template used to create the message to be displayed for
the error | 2255 * @param message the template used to create the message to be displayed for
the error |
| 2170 * @param correction the template used to create the correction to be displaye
d for the error | 2256 * @param correction the template used to create the correction to be displaye
d for the error |
| 2171 */ | 2257 */ |
| 2172 CompileTimeErrorCode.con2(String name, int ordinal, this.message, String corre
ction) : super(name, ordinal) { | 2258 CompileTimeErrorCode.con2(String name, int ordinal, this.message, String corre
ction) : super(name, ordinal) { |
| 2173 this.correction2 = correction; | 2259 this.correction3 = correction; |
| 2174 } | 2260 } |
| 2175 | 2261 |
| 2176 String get correction => correction2; | 2262 String get correction => correction3; |
| 2177 | 2263 |
| 2178 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; | 2264 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; |
| 2179 | 2265 |
| 2180 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; | 2266 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
| 2181 } | 2267 } |
| 2182 | 2268 |
| 2183 /** | 2269 /** |
| 2184 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin
g deviations | 2270 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin
g deviations |
| 2185 * from pub best practices. The convention for this class is for the name of the
bad practice to | 2271 * from pub best practices. The convention for this class is for the name of the
bad practice to |
| 2186 * indicate the problem that caused the suggestion to be generated and for the m
essage to explain | 2272 * indicate the problem that caused the suggestion to be generated and for the m
essage to explain |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2217 | 2303 |
| 2218 /** | 2304 /** |
| 2219 * The template used to create the message to be displayed for this error. | 2305 * The template used to create the message to be displayed for this error. |
| 2220 */ | 2306 */ |
| 2221 final String message; | 2307 final String message; |
| 2222 | 2308 |
| 2223 /** | 2309 /** |
| 2224 * The template used to create the correction to be displayed for this error,
or `null` if | 2310 * The template used to create the correction to be displayed for this error,
or `null` if |
| 2225 * there is no correction information for this error. | 2311 * there is no correction information for this error. |
| 2226 */ | 2312 */ |
| 2227 String correction5; | 2313 String correction6; |
| 2228 | 2314 |
| 2229 /** | 2315 /** |
| 2230 * Initialize a newly created error code to have the given message. | 2316 * Initialize a newly created error code to have the given message. |
| 2231 * | 2317 * |
| 2232 * @param message the message template used to create the message to be displa
yed for the error | 2318 * @param message the message template used to create the message to be displa
yed for the error |
| 2233 */ | 2319 */ |
| 2234 PubSuggestionCode.con1(String name, int ordinal, this.message) : super(name, o
rdinal); | 2320 PubSuggestionCode.con1(String name, int ordinal, this.message) : super(name, o
rdinal); |
| 2235 | 2321 |
| 2236 /** | 2322 /** |
| 2237 * Initialize a newly created error code to have the given message and correct
ion. | 2323 * Initialize a newly created error code to have the given message and correct
ion. |
| 2238 * | 2324 * |
| 2239 * @param message the template used to create the message to be displayed for
the error | 2325 * @param message the template used to create the message to be displayed for
the error |
| 2240 * @param correction the template used to create the correction to be displaye
d for the error | 2326 * @param correction the template used to create the correction to be displaye
d for the error |
| 2241 */ | 2327 */ |
| 2242 PubSuggestionCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { | 2328 PubSuggestionCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { |
| 2243 this.correction5 = correction; | 2329 this.correction6 = correction; |
| 2244 } | 2330 } |
| 2245 | 2331 |
| 2246 String get correction => correction5; | 2332 String get correction => correction6; |
| 2247 | 2333 |
| 2248 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; | 2334 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; |
| 2249 | 2335 |
| 2250 ErrorType get type => ErrorType.PUB_SUGGESTION; | 2336 ErrorType get type => ErrorType.PUB_SUGGESTION; |
| 2251 } | 2337 } |
| 2252 | 2338 |
| 2253 /** | 2339 /** |
| 2254 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The | 2340 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The |
| 2255 * convention for this class is for the name of the error code to indicate the p
roblem that caused | 2341 * convention for this class is for the name of the error code to indicate the p
roblem that caused |
| 2256 * the error to be generated and for the error message to explain what is wrong
and, when | 2342 * the error to be generated and for the error message to explain what is wrong
and, when |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3107 | 3193 |
| 3108 /** | 3194 /** |
| 3109 * The template used to create the message to be displayed for this error. | 3195 * The template used to create the message to be displayed for this error. |
| 3110 */ | 3196 */ |
| 3111 final String message; | 3197 final String message; |
| 3112 | 3198 |
| 3113 /** | 3199 /** |
| 3114 * The template used to create the correction to be displayed for this error,
or `null` if | 3200 * The template used to create the correction to be displayed for this error,
or `null` if |
| 3115 * there is no correction information for this error. | 3201 * there is no correction information for this error. |
| 3116 */ | 3202 */ |
| 3117 String correction7; | 3203 String correction8; |
| 3118 | 3204 |
| 3119 /** | 3205 /** |
| 3120 * Initialize a newly created error code to have the given message. | 3206 * Initialize a newly created error code to have the given message. |
| 3121 * | 3207 * |
| 3122 * @param message the message template used to create the message to be displa
yed for the error | 3208 * @param message the message template used to create the message to be displa
yed for the error |
| 3123 */ | 3209 */ |
| 3124 StaticWarningCode.con1(String name, int ordinal, this.message) : super(name, o
rdinal); | 3210 StaticWarningCode.con1(String name, int ordinal, this.message) : super(name, o
rdinal); |
| 3125 | 3211 |
| 3126 /** | 3212 /** |
| 3127 * Initialize a newly created error code to have the given message and correct
ion. | 3213 * Initialize a newly created error code to have the given message and correct
ion. |
| 3128 * | 3214 * |
| 3129 * @param message the template used to create the message to be displayed for
the error | 3215 * @param message the template used to create the message to be displayed for
the error |
| 3130 * @param correction the template used to create the correction to be displaye
d for the error | 3216 * @param correction the template used to create the correction to be displaye
d for the error |
| 3131 */ | 3217 */ |
| 3132 StaticWarningCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { | 3218 StaticWarningCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { |
| 3133 this.correction7 = correction; | 3219 this.correction8 = correction; |
| 3134 } | 3220 } |
| 3135 | 3221 |
| 3136 String get correction => correction7; | 3222 String get correction => correction8; |
| 3137 | 3223 |
| 3138 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; | 3224 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
| 3139 | 3225 |
| 3140 ErrorType get type => ErrorType.STATIC_WARNING; | 3226 ErrorType get type => ErrorType.STATIC_WARNING; |
| 3141 } | 3227 } |
| 3142 | 3228 |
| 3143 /** | 3229 /** |
| 3144 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for | 3230 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for |
| 3145 * [AnalysisError] being produced by the analysis engine. | 3231 * [AnalysisError] being produced by the analysis engine. |
| 3146 * | 3232 * |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3194 | 3280 |
| 3195 /** | 3281 /** |
| 3196 * The template used to create the message to be displayed for this error. | 3282 * The template used to create the message to be displayed for this error. |
| 3197 */ | 3283 */ |
| 3198 final String message; | 3284 final String message; |
| 3199 | 3285 |
| 3200 /** | 3286 /** |
| 3201 * The template used to create the correction to be displayed for this error,
or `null` if | 3287 * The template used to create the correction to be displayed for this error,
or `null` if |
| 3202 * there is no correction information for this error. | 3288 * there is no correction information for this error. |
| 3203 */ | 3289 */ |
| 3204 String correction4; | 3290 String correction5; |
| 3205 | 3291 |
| 3206 /** | 3292 /** |
| 3207 * Initialize a newly created error code to have the given message. | 3293 * Initialize a newly created error code to have the given message. |
| 3208 * | 3294 * |
| 3209 * @param message the message template used to create the message to be displa
yed for the error | 3295 * @param message the message template used to create the message to be displa
yed for the error |
| 3210 */ | 3296 */ |
| 3211 HtmlWarningCode.con1(String name, int ordinal, this.message) : super(name, ord
inal); | 3297 HtmlWarningCode.con1(String name, int ordinal, this.message) : super(name, ord
inal); |
| 3212 | 3298 |
| 3213 /** | 3299 /** |
| 3214 * Initialize a newly created error code to have the given message and correct
ion. | 3300 * Initialize a newly created error code to have the given message and correct
ion. |
| 3215 * | 3301 * |
| 3216 * @param message the template used to create the message to be displayed for
the error | 3302 * @param message the template used to create the message to be displayed for
the error |
| 3217 * @param correction the template used to create the correction to be displaye
d for the error | 3303 * @param correction the template used to create the correction to be displaye
d for the error |
| 3218 */ | 3304 */ |
| 3219 HtmlWarningCode.con2(String name, int ordinal, this.message, String correction
) : super(name, ordinal) { | 3305 HtmlWarningCode.con2(String name, int ordinal, this.message, String correction
) : super(name, ordinal) { |
| 3220 this.correction4 = correction; | 3306 this.correction5 = correction; |
| 3221 } | 3307 } |
| 3222 | 3308 |
| 3223 String get correction => correction4; | 3309 String get correction => correction5; |
| 3224 | 3310 |
| 3225 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 3311 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
| 3226 | 3312 |
| 3227 ErrorType get type => ErrorType.STATIC_WARNING; | 3313 ErrorType get type => ErrorType.STATIC_WARNING; |
| 3228 } | 3314 } |
| 3229 | 3315 |
| 3230 /** | 3316 /** |
| 3231 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type | 3317 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type |
| 3232 * warnings. The convention for this class is for the name of the error code to
indicate the problem | 3318 * warnings. The convention for this class is for the name of the error code to
indicate the problem |
| 3233 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 3319 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3521 | 3607 |
| 3522 /** | 3608 /** |
| 3523 * The template used to create the message to be displayed for this error. | 3609 * The template used to create the message to be displayed for this error. |
| 3524 */ | 3610 */ |
| 3525 final String message; | 3611 final String message; |
| 3526 | 3612 |
| 3527 /** | 3613 /** |
| 3528 * The template used to create the correction to be displayed for this error,
or `null` if | 3614 * The template used to create the correction to be displayed for this error,
or `null` if |
| 3529 * there is no correction information for this error. | 3615 * there is no correction information for this error. |
| 3530 */ | 3616 */ |
| 3531 String correction6; | 3617 String correction7; |
| 3532 | 3618 |
| 3533 /** | 3619 /** |
| 3534 * Initialize a newly created error code to have the given message. | 3620 * Initialize a newly created error code to have the given message. |
| 3535 * | 3621 * |
| 3536 * @param message the message template used to create the message to be displa
yed for the error | 3622 * @param message the message template used to create the message to be displa
yed for the error |
| 3537 */ | 3623 */ |
| 3538 StaticTypeWarningCode.con1(String name, int ordinal, this.message) : super(nam
e, ordinal); | 3624 StaticTypeWarningCode.con1(String name, int ordinal, this.message) : super(nam
e, ordinal); |
| 3539 | 3625 |
| 3540 /** | 3626 /** |
| 3541 * Initialize a newly created error code to have the given message and correct
ion. | 3627 * Initialize a newly created error code to have the given message and correct
ion. |
| 3542 * | 3628 * |
| 3543 * @param message the template used to create the message to be displayed for
the error | 3629 * @param message the template used to create the message to be displayed for
the error |
| 3544 * @param correction the template used to create the correction to be displaye
d for the error | 3630 * @param correction the template used to create the correction to be displaye
d for the error |
| 3545 */ | 3631 */ |
| 3546 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr
ection) : super(name, ordinal) { | 3632 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr
ection) : super(name, ordinal) { |
| 3547 this.correction6 = correction; | 3633 this.correction7 = correction; |
| 3548 } | 3634 } |
| 3549 | 3635 |
| 3550 String get correction => correction6; | 3636 String get correction => correction7; |
| 3551 | 3637 |
| 3552 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 3638 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 3553 | 3639 |
| 3554 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 3640 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 3555 } | 3641 } |
| OLD | NEW |