| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.error; | 8 library engine.error; |
| 9 | 9 |
| 10 import 'java_core.dart'; | 10 import 'java_core.dart'; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 * Initialize a newly created analysis error for the specified source at the g
iven location. | 92 * Initialize a newly created analysis error for the specified source at the g
iven location. |
| 93 * | 93 * |
| 94 * @param source the source for which the exception occurred | 94 * @param source the source for which the exception occurred |
| 95 * @param offset the offset of the location of the error | 95 * @param offset the offset of the location of the error |
| 96 * @param length the length of the location of the error | 96 * @param length the length of the location of the error |
| 97 * @param errorCode the error code to be associated with this error | 97 * @param errorCode the error code to be associated with this error |
| 98 * @param arguments the arguments used to build the error message | 98 * @param arguments the arguments used to build the error message |
| 99 */ | 99 */ |
| 100 AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorC
ode errorCode, List<Object> arguments) : super.con2(source, offset, length, erro
rCode, arguments); | 100 AnalysisErrorWithProperties.con2(Source source, int offset, int length, ErrorC
ode errorCode, List<Object> arguments) : super.con2(source, offset, length, erro
rCode, arguments); |
| 101 | 101 |
| 102 @override |
| 102 Object getProperty(ErrorProperty property) => _propertyMap[property]; | 103 Object getProperty(ErrorProperty property) => _propertyMap[property]; |
| 103 | 104 |
| 104 /** | 105 /** |
| 105 * Set the value of the given property to the given value. Using a value of `n
ull` will | 106 * Set the value of the given property to the given value. Using a value of `n
ull` will |
| 106 * effectively remove the property from this error. | 107 * effectively remove the property from this error. |
| 107 * | 108 * |
| 108 * @param property the property whose value is to be returned | 109 * @param property the property whose value is to be returned |
| 109 * @param value the new value of the given property | 110 * @param value the new value of the given property |
| 110 */ | 111 */ |
| 111 void setProperty(ErrorProperty property, Object value) { | 112 void setProperty(ErrorProperty property, Object value) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 123 */ | 124 */ |
| 124 bool _errorReported = false; | 125 bool _errorReported = false; |
| 125 | 126 |
| 126 /** | 127 /** |
| 127 * Return `true` if an error has been reported to this listener. | 128 * Return `true` if an error has been reported to this listener. |
| 128 * | 129 * |
| 129 * @return `true` if an error has been reported to this listener | 130 * @return `true` if an error has been reported to this listener |
| 130 */ | 131 */ |
| 131 bool get errorReported => _errorReported; | 132 bool get errorReported => _errorReported; |
| 132 | 133 |
| 134 @override |
| 133 void onError(AnalysisError error) { | 135 void onError(AnalysisError error) { |
| 134 _errorReported = true; | 136 _errorReported = true; |
| 135 } | 137 } |
| 136 } | 138 } |
| 137 | 139 |
| 138 /** | 140 /** |
| 139 * The enumeration `AngularCode` defines Angular specific problems. | 141 * The enumeration `AngularCode` defines Angular specific problems. |
| 140 */ | 142 */ |
| 141 class AngularCode extends Enum<AngularCode> implements ErrorCode { | 143 class AngularCode extends Enum<AngularCode> implements ErrorCode { |
| 142 static final AngularCode CANNOT_PARSE_SELECTOR = new AngularCode.con1('CANNOT_
PARSE_SELECTOR', 0, "The selector '%s' cannot be parsed"); | 144 static final AngularCode CANNOT_PARSE_SELECTOR = new AngularCode.con1('CANNOT_
PARSE_SELECTOR', 0, "The selector '%s' cannot be parsed"); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 * Initialize a newly created error code to have the given message. | 206 * Initialize a newly created error code to have the given message. |
| 205 * | 207 * |
| 206 * @param message the message template used to create the message to be displa
yed for the error | 208 * @param message the message template used to create the message to be displa
yed for the error |
| 207 * @param severity the severity of the problem | 209 * @param severity the severity of the problem |
| 208 */ | 210 */ |
| 209 AngularCode.con2(String name, int ordinal, String message, ErrorSeverity sever
ity) : super(name, ordinal) { | 211 AngularCode.con2(String name, int ordinal, String message, ErrorSeverity sever
ity) : super(name, ordinal) { |
| 210 this._message = message; | 212 this._message = message; |
| 211 this._severity = ErrorSeverity.INFO; | 213 this._severity = ErrorSeverity.INFO; |
| 212 } | 214 } |
| 213 | 215 |
| 216 @override |
| 214 String get correction => null; | 217 String get correction => null; |
| 215 | 218 |
| 219 @override |
| 216 ErrorSeverity get errorSeverity => _severity; | 220 ErrorSeverity get errorSeverity => _severity; |
| 217 | 221 |
| 222 @override |
| 218 String get message => _message; | 223 String get message => _message; |
| 219 | 224 |
| 225 @override |
| 220 ErrorType get type => ErrorType.ANGULAR; | 226 ErrorType get type => ErrorType.ANGULAR; |
| 221 } | 227 } |
| 222 | 228 |
| 223 /** | 229 /** |
| 224 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to | 230 * Instances of the class `ErrorReporter` wrap an error listener with utility me
thods used to |
| 225 * create the errors being reported. | 231 * create the errors being reported. |
| 226 */ | 232 */ |
| 227 class ErrorReporter { | 233 class ErrorReporter { |
| 228 /** | 234 /** |
| 229 * The error listener to which errors will be reported. | 235 * The error listener to which errors will be reported. |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 AnalysisError.con2(this.source, int offset, int length, this.errorCode, List<O
bject> arguments) { | 435 AnalysisError.con2(this.source, int offset, int length, this.errorCode, List<O
bject> arguments) { |
| 430 this._offset = offset; | 436 this._offset = offset; |
| 431 this._length = length; | 437 this._length = length; |
| 432 this._message = JavaString.format(errorCode.message, arguments); | 438 this._message = JavaString.format(errorCode.message, arguments); |
| 433 String correctionTemplate = errorCode.correction; | 439 String correctionTemplate = errorCode.correction; |
| 434 if (correctionTemplate != null) { | 440 if (correctionTemplate != null) { |
| 435 this._correction = JavaString.format(correctionTemplate, arguments); | 441 this._correction = JavaString.format(correctionTemplate, arguments); |
| 436 } | 442 } |
| 437 } | 443 } |
| 438 | 444 |
| 445 @override |
| 439 bool operator ==(Object obj) { | 446 bool operator ==(Object obj) { |
| 440 if (identical(obj, this)) { | 447 if (identical(obj, this)) { |
| 441 return true; | 448 return true; |
| 442 } | 449 } |
| 443 // prepare other AnalysisError | 450 // prepare other AnalysisError |
| 444 if (obj is! AnalysisError) { | 451 if (obj is! AnalysisError) { |
| 445 return false; | 452 return false; |
| 446 } | 453 } |
| 447 AnalysisError other = obj as AnalysisError; | 454 AnalysisError other = obj as AnalysisError; |
| 448 // Quick checks. | 455 // Quick checks. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 507 |
| 501 /** | 508 /** |
| 502 * Return the value of the given property, or `null` if the given property is
not defined | 509 * Return the value of the given property, or `null` if the given property is
not defined |
| 503 * for this error. | 510 * for this error. |
| 504 * | 511 * |
| 505 * @param property the property whose value is to be returned | 512 * @param property the property whose value is to be returned |
| 506 * @return the value of the given property | 513 * @return the value of the given property |
| 507 */ | 514 */ |
| 508 Object getProperty(ErrorProperty property) => null; | 515 Object getProperty(ErrorProperty property) => null; |
| 509 | 516 |
| 517 @override |
| 510 int get hashCode { | 518 int get hashCode { |
| 511 int hashCode = _offset; | 519 int hashCode = _offset; |
| 512 hashCode ^= (_message != null) ? _message.hashCode : 0; | 520 hashCode ^= (_message != null) ? _message.hashCode : 0; |
| 513 hashCode ^= (source != null) ? source.hashCode : 0; | 521 hashCode ^= (source != null) ? source.hashCode : 0; |
| 514 return hashCode; | 522 return hashCode; |
| 515 } | 523 } |
| 516 | 524 |
| 525 @override |
| 517 String toString() { | 526 String toString() { |
| 518 JavaStringBuilder builder = new JavaStringBuilder(); | 527 JavaStringBuilder builder = new JavaStringBuilder(); |
| 519 builder.append((source != null) ? source.fullName : "<unknown source>"); | 528 builder.append((source != null) ? source.fullName : "<unknown source>"); |
| 520 builder.append("("); | 529 builder.append("("); |
| 521 builder.append(_offset); | 530 builder.append(_offset); |
| 522 builder.append(".."); | 531 builder.append(".."); |
| 523 builder.append(_offset + _length - 1); | 532 builder.append(_offset + _length - 1); |
| 524 builder.append("): "); | 533 builder.append("): "); |
| 525 //builder.append("(" + lineNumber + ":" + columnNumber + "): "); | 534 //builder.append("(" + lineNumber + ":" + columnNumber + "): "); |
| 526 builder.append(_message); | 535 builder.append(_message); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 * * TODO | 574 * * TODO |
| 566 * | 575 * |
| 567 * But not | 576 * But not |
| 568 * * todo | 577 * * todo |
| 569 * * TODOS | 578 * * TODOS |
| 570 */ | 579 */ |
| 571 static RegExp TODO_REGEX = new RegExp("([\\s/\\*])((TODO[^\\w\\d][^\\r\\n]*)|(
TODO:?\$))"); | 580 static RegExp TODO_REGEX = new RegExp("([\\s/\\*])((TODO[^\\w\\d][^\\r\\n]*)|(
TODO:?\$))"); |
| 572 | 581 |
| 573 TodoCode(String name, int ordinal) : super(name, ordinal); | 582 TodoCode(String name, int ordinal) : super(name, ordinal); |
| 574 | 583 |
| 584 @override |
| 575 String get correction => null; | 585 String get correction => null; |
| 576 | 586 |
| 587 @override |
| 577 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 588 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 578 | 589 |
| 590 @override |
| 579 String get message => "%s"; | 591 String get message => "%s"; |
| 580 | 592 |
| 593 @override |
| 581 ErrorType get type => ErrorType.TODO; | 594 ErrorType get type => ErrorType.TODO; |
| 582 } | 595 } |
| 583 | 596 |
| 584 /** | 597 /** |
| 585 * The enumeration `HintCode` defines the hints and coding recommendations for b
est practices | 598 * The enumeration `HintCode` defines the hints and coding recommendations for b
est practices |
| 586 * which are not mentioned in the Dart Language Specification. | 599 * which are not mentioned in the Dart Language Specification. |
| 587 */ | 600 */ |
| 588 class HintCode extends Enum<HintCode> implements ErrorCode { | 601 class HintCode extends Enum<HintCode> implements ErrorCode { |
| 589 /** | 602 /** |
| 590 * Dead code is code that is never reached, this can happen for instance if a
statement follows a | 603 * Dead code is code that is never reached, this can happen for instance if a
statement follows a |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 /** | 831 /** |
| 819 * Initialize a newly created error code to have the given message and correct
ion. | 832 * Initialize a newly created error code to have the given message and correct
ion. |
| 820 * | 833 * |
| 821 * @param message the template used to create the message to be displayed for
the error | 834 * @param message the template used to create the message to be displayed for
the error |
| 822 * @param correction the template used to create the correction to be displaye
d for the error | 835 * @param correction the template used to create the correction to be displaye
d for the error |
| 823 */ | 836 */ |
| 824 HintCode.con2(String name, int ordinal, this.message, String correction) : sup
er(name, ordinal) { | 837 HintCode.con2(String name, int ordinal, this.message, String correction) : sup
er(name, ordinal) { |
| 825 this.correction3 = correction; | 838 this.correction3 = correction; |
| 826 } | 839 } |
| 827 | 840 |
| 841 @override |
| 828 String get correction => correction3; | 842 String get correction => correction3; |
| 829 | 843 |
| 844 @override |
| 830 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; | 845 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
| 831 | 846 |
| 847 @override |
| 832 ErrorType get type => ErrorType.HINT; | 848 ErrorType get type => ErrorType.HINT; |
| 833 } | 849 } |
| 834 | 850 |
| 835 /** | 851 /** |
| 836 * The interface `ErrorCode` defines the behavior common to objects representing
error codes | 852 * The interface `ErrorCode` defines the behavior common to objects representing
error codes |
| 837 * associated with [AnalysisError]. | 853 * associated with [AnalysisError]. |
| 838 * | 854 * |
| 839 * Generally, we want to provide messages that consist of three sentences: 1. wh
at is wrong, 2. why | 855 * Generally, we want to provide messages that consist of three sentences: 1. wh
at is wrong, 2. why |
| 840 * is it wrong, and 3. how do I fix it. However, we combine the first two in the
result of | 856 * is it wrong, and 3. how do I fix it. However, we combine the first two in the
result of |
| 841 * [getMessage] and the last in the result of [getCorrection]. | 857 * [getMessage] and the last in the result of [getCorrection]. |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2276 /** | 2292 /** |
| 2277 * Initialize a newly created error code to have the given message and correct
ion. | 2293 * Initialize a newly created error code to have the given message and correct
ion. |
| 2278 * | 2294 * |
| 2279 * @param message the template used to create the message to be displayed for
the error | 2295 * @param message the template used to create the message to be displayed for
the error |
| 2280 * @param correction the template used to create the correction to be displaye
d for the error | 2296 * @param correction the template used to create the correction to be displaye
d for the error |
| 2281 */ | 2297 */ |
| 2282 CompileTimeErrorCode.con2(String name, int ordinal, this.message, String corre
ction) : super(name, ordinal) { | 2298 CompileTimeErrorCode.con2(String name, int ordinal, this.message, String corre
ction) : super(name, ordinal) { |
| 2283 this.correction2 = correction; | 2299 this.correction2 = correction; |
| 2284 } | 2300 } |
| 2285 | 2301 |
| 2302 @override |
| 2286 String get correction => correction2; | 2303 String get correction => correction2; |
| 2287 | 2304 |
| 2305 @override |
| 2288 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; | 2306 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; |
| 2289 | 2307 |
| 2308 @override |
| 2290 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; | 2309 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
| 2291 } | 2310 } |
| 2292 | 2311 |
| 2293 /** | 2312 /** |
| 2294 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin
g deviations | 2313 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin
g deviations |
| 2295 * from pub best practices. The convention for this class is for the name of the
bad practice to | 2314 * from pub best practices. The convention for this class is for the name of the
bad practice to |
| 2296 * indicate the problem that caused the suggestion to be generated and for the m
essage to explain | 2315 * indicate the problem that caused the suggestion to be generated and for the m
essage to explain |
| 2297 * what is wrong and, when appropriate, how the situation can be corrected. | 2316 * what is wrong and, when appropriate, how the situation can be corrected. |
| 2298 */ | 2317 */ |
| 2299 class PubSuggestionCode extends Enum<PubSuggestionCode> implements ErrorCode { | 2318 class PubSuggestionCode extends Enum<PubSuggestionCode> implements ErrorCode { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2346 /** | 2365 /** |
| 2347 * Initialize a newly created error code to have the given message and correct
ion. | 2366 * Initialize a newly created error code to have the given message and correct
ion. |
| 2348 * | 2367 * |
| 2349 * @param message the template used to create the message to be displayed for
the error | 2368 * @param message the template used to create the message to be displayed for
the error |
| 2350 * @param correction the template used to create the correction to be displaye
d for the error | 2369 * @param correction the template used to create the correction to be displaye
d for the error |
| 2351 */ | 2370 */ |
| 2352 PubSuggestionCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { | 2371 PubSuggestionCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { |
| 2353 this.correction5 = correction; | 2372 this.correction5 = correction; |
| 2354 } | 2373 } |
| 2355 | 2374 |
| 2375 @override |
| 2356 String get correction => correction5; | 2376 String get correction => correction5; |
| 2357 | 2377 |
| 2378 @override |
| 2358 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; | 2379 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; |
| 2359 | 2380 |
| 2381 @override |
| 2360 ErrorType get type => ErrorType.PUB_SUGGESTION; | 2382 ErrorType get type => ErrorType.PUB_SUGGESTION; |
| 2361 } | 2383 } |
| 2362 | 2384 |
| 2363 /** | 2385 /** |
| 2364 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The | 2386 * The enumeration `StaticWarningCode` defines the error codes used for static w
arnings. The |
| 2365 * convention for this class is for the name of the error code to indicate the p
roblem that caused | 2387 * convention for this class is for the name of the error code to indicate the p
roblem that caused |
| 2366 * the error to be generated and for the error message to explain what is wrong
and, when | 2388 * the error to be generated and for the error message to explain what is wrong
and, when |
| 2367 * appropriate, how the problem can be corrected. | 2389 * appropriate, how the problem can be corrected. |
| 2368 */ | 2390 */ |
| 2369 class StaticWarningCode extends Enum<StaticWarningCode> implements ErrorCode { | 2391 class StaticWarningCode extends Enum<StaticWarningCode> implements ErrorCode { |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3230 /** | 3252 /** |
| 3231 * Initialize a newly created error code to have the given message and correct
ion. | 3253 * Initialize a newly created error code to have the given message and correct
ion. |
| 3232 * | 3254 * |
| 3233 * @param message the template used to create the message to be displayed for
the error | 3255 * @param message the template used to create the message to be displayed for
the error |
| 3234 * @param correction the template used to create the correction to be displaye
d for the error | 3256 * @param correction the template used to create the correction to be displaye
d for the error |
| 3235 */ | 3257 */ |
| 3236 StaticWarningCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { | 3258 StaticWarningCode.con2(String name, int ordinal, this.message, String correcti
on) : super(name, ordinal) { |
| 3237 this.correction7 = correction; | 3259 this.correction7 = correction; |
| 3238 } | 3260 } |
| 3239 | 3261 |
| 3262 @override |
| 3240 String get correction => correction7; | 3263 String get correction => correction7; |
| 3241 | 3264 |
| 3265 @override |
| 3242 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; | 3266 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; |
| 3243 | 3267 |
| 3268 @override |
| 3244 ErrorType get type => ErrorType.STATIC_WARNING; | 3269 ErrorType get type => ErrorType.STATIC_WARNING; |
| 3245 } | 3270 } |
| 3246 | 3271 |
| 3247 /** | 3272 /** |
| 3248 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for | 3273 * The interface `AnalysisErrorListener` defines the behavior of objects that li
sten for |
| 3249 * [AnalysisError] being produced by the analysis engine. | 3274 * [AnalysisError] being produced by the analysis engine. |
| 3250 */ | 3275 */ |
| 3251 abstract class AnalysisErrorListener { | 3276 abstract class AnalysisErrorListener { |
| 3252 /** | 3277 /** |
| 3253 * An error listener that ignores errors that are reported to it. | 3278 * An error listener that ignores errors that are reported to it. |
| 3254 */ | 3279 */ |
| 3255 static final AnalysisErrorListener NULL_LISTENER = new AnalysisErrorListener_N
ULL_LISTENER(); | 3280 static final AnalysisErrorListener NULL_LISTENER = new AnalysisErrorListener_N
ULL_LISTENER(); |
| 3256 | 3281 |
| 3257 /** | 3282 /** |
| 3258 * This method is invoked when an error has been found by the analysis engine. | 3283 * This method is invoked when an error has been found by the analysis engine. |
| 3259 * | 3284 * |
| 3260 * @param error the error that was just found (not `null`) | 3285 * @param error the error that was just found (not `null`) |
| 3261 */ | 3286 */ |
| 3262 void onError(AnalysisError error); | 3287 void onError(AnalysisError error); |
| 3263 } | 3288 } |
| 3264 | 3289 |
| 3265 class AnalysisErrorListener_NULL_LISTENER implements AnalysisErrorListener { | 3290 class AnalysisErrorListener_NULL_LISTENER implements AnalysisErrorListener { |
| 3291 @override |
| 3266 void onError(AnalysisError event) { | 3292 void onError(AnalysisError event) { |
| 3267 } | 3293 } |
| 3268 } | 3294 } |
| 3269 | 3295 |
| 3270 /** | 3296 /** |
| 3271 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. | 3297 * The enumeration `HtmlWarningCode` defines the error codes used for warnings i
n HTML files. |
| 3272 * The convention for this class is for the name of the error code to indicate t
he problem that | 3298 * The convention for this class is for the name of the error code to indicate t
he problem that |
| 3273 * caused the error to be generated and for the error message to explain what is
wrong and, when | 3299 * caused the error to be generated and for the error message to explain what is
wrong and, when |
| 3274 * appropriate, how the problem can be corrected. | 3300 * appropriate, how the problem can be corrected. |
| 3275 */ | 3301 */ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3313 /** | 3339 /** |
| 3314 * Initialize a newly created error code to have the given message and correct
ion. | 3340 * Initialize a newly created error code to have the given message and correct
ion. |
| 3315 * | 3341 * |
| 3316 * @param message the template used to create the message to be displayed for
the error | 3342 * @param message the template used to create the message to be displayed for
the error |
| 3317 * @param correction the template used to create the correction to be displaye
d for the error | 3343 * @param correction the template used to create the correction to be displaye
d for the error |
| 3318 */ | 3344 */ |
| 3319 HtmlWarningCode.con2(String name, int ordinal, this.message, String correction
) : super(name, ordinal) { | 3345 HtmlWarningCode.con2(String name, int ordinal, this.message, String correction
) : super(name, ordinal) { |
| 3320 this.correction4 = correction; | 3346 this.correction4 = correction; |
| 3321 } | 3347 } |
| 3322 | 3348 |
| 3349 @override |
| 3323 String get correction => correction4; | 3350 String get correction => correction4; |
| 3324 | 3351 |
| 3352 @override |
| 3325 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 3353 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
| 3326 | 3354 |
| 3355 @override |
| 3327 ErrorType get type => ErrorType.STATIC_WARNING; | 3356 ErrorType get type => ErrorType.STATIC_WARNING; |
| 3328 } | 3357 } |
| 3329 | 3358 |
| 3330 /** | 3359 /** |
| 3331 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type | 3360 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat
ic type |
| 3332 * warnings. The convention for this class is for the name of the error code to
indicate the problem | 3361 * warnings. The convention for this class is for the name of the error code to
indicate the problem |
| 3333 * that caused the error to be generated and for the error message to explain wh
at is wrong and, | 3362 * that caused the error to be generated and for the error message to explain wh
at is wrong and, |
| 3334 * when appropriate, how the problem can be corrected. | 3363 * when appropriate, how the problem can be corrected. |
| 3335 */ | 3364 */ |
| 3336 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error
Code { | 3365 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error
Code { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3638 /** | 3667 /** |
| 3639 * Initialize a newly created error code to have the given message and correct
ion. | 3668 * Initialize a newly created error code to have the given message and correct
ion. |
| 3640 * | 3669 * |
| 3641 * @param message the template used to create the message to be displayed for
the error | 3670 * @param message the template used to create the message to be displayed for
the error |
| 3642 * @param correction the template used to create the correction to be displaye
d for the error | 3671 * @param correction the template used to create the correction to be displaye
d for the error |
| 3643 */ | 3672 */ |
| 3644 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr
ection) : super(name, ordinal) { | 3673 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr
ection) : super(name, ordinal) { |
| 3645 this.correction6 = correction; | 3674 this.correction6 = correction; |
| 3646 } | 3675 } |
| 3647 | 3676 |
| 3677 @override |
| 3648 String get correction => correction6; | 3678 String get correction => correction6; |
| 3649 | 3679 |
| 3680 @override |
| 3650 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 3681 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 3651 | 3682 |
| 3683 @override |
| 3652 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 3684 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 3653 } | 3685 } |
| OLD | NEW |