Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 109853003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/html.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
36 /** 36 /**
37 * The severity representing an error. 37 * The severity representing an error.
38 */ 38 */
39 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error") ; 39 static final ErrorSeverity ERROR = new ErrorSeverity('ERROR', 3, "E", "error") ;
40 40
41 static final List<ErrorSeverity> values = [NONE, INFO, WARNING, ERROR]; 41 static final List<ErrorSeverity> values = [NONE, INFO, WARNING, ERROR];
42 42
43 /** 43 /**
44 * The name of the severity used when producing machine output. 44 * The name of the severity used when producing machine output.
45 */ 45 */
46 String machineCode; 46 final String machineCode;
47 47
48 /** 48 /**
49 * The name of the severity used when producing readable output. 49 * The name of the severity used when producing readable output.
50 */ 50 */
51 String displayName; 51 final String displayName;
52 52
53 /** 53 /**
54 * Initialize a newly created severity with the given names. 54 * Initialize a newly created severity with the given names.
55 * 55 *
56 * @param machineCode the name of the severity used when producing machine out put 56 * @param machineCode the name of the severity used when producing machine out put
57 * @param displayName the name of the severity used when producing readable ou tput 57 * @param displayName the name of the severity used when producing readable ou tput
58 */ 58 */
59 ErrorSeverity(String name, int ordinal, String machineCode, String displayName ) : super(name, ordinal) { 59 ErrorSeverity(String name, int ordinal, this.machineCode, this.displayName) : super(name, ordinal);
60 this.machineCode = machineCode;
61 this.displayName = displayName;
62 }
63 60
64 /** 61 /**
65 * Return the severity constant that represents the greatest severity. 62 * Return the severity constant that represents the greatest severity.
66 * 63 *
67 * @param severity the severity being compared against 64 * @param severity the severity being compared against
68 * @return the most sever of this or the given severity 65 * @return the most sever of this or the given severity
69 */ 66 */
70 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity; 67 ErrorSeverity max(ErrorSeverity severity) => this.ordinal >= severity.ordinal ? this : severity;
71 } 68 }
72 69
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 112 }
116 113
117 /** 114 /**
118 * Instances of the class `BooleanErrorListener` implement a listener that keeps track of 115 * Instances of the class `BooleanErrorListener` implement a listener that keeps track of
119 * whether an error has been reported to it. 116 * whether an error has been reported to it.
120 */ 117 */
121 class BooleanErrorListener implements AnalysisErrorListener { 118 class BooleanErrorListener implements AnalysisErrorListener {
122 /** 119 /**
123 * A flag indicating whether an error has been reported to this listener. 120 * A flag indicating whether an error has been reported to this listener.
124 */ 121 */
125 bool errorReported = false; 122 bool _errorReported = false;
123
124 /**
125 * Return `true` if an error has been reported to this listener.
126 *
127 * @return `true` if an error has been reported to this listener
128 */
129 bool get errorReported => _errorReported;
126 130
127 void onError(AnalysisError error) { 131 void onError(AnalysisError error) {
128 errorReported = true; 132 _errorReported = true;
129 } 133 }
130 } 134 }
131 135
132 /** 136 /**
133 * Instances of the class `ErrorReporter` wrap an error listener with utility me thods used to 137 * Instances of the class `ErrorReporter` wrap an error listener with utility me thods used to
134 * create the errors being reported. 138 * create the errors being reported.
135 * 139 *
136 * @coverage dart.engine.error 140 * @coverage dart.engine.error
137 */ 141 */
138 class ErrorReporter { 142 class ErrorReporter {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (errorSeverity1 == errorSeverity2) { 279 if (errorSeverity1 == errorSeverity2) {
276 return errorType1.compareTo(errorType2); 280 return errorType1.compareTo(errorType2);
277 } else { 281 } else {
278 return errorSeverity2.compareTo(errorSeverity1); 282 return errorSeverity2.compareTo(errorSeverity1);
279 } 283 }
280 }; 284 };
281 285
282 /** 286 /**
283 * The error code associated with the error. 287 * The error code associated with the error.
284 */ 288 */
285 ErrorCode errorCode; 289 final ErrorCode errorCode;
286 290
287 /** 291 /**
288 * The localized error message. 292 * The localized error message.
289 */ 293 */
290 String message; 294 String _message;
291 295
292 /** 296 /**
293 * The correction to be displayed for this error, or `null` if there is no cor rection 297 * The correction to be displayed for this error, or `null` if there is no cor rection
294 * information for this error. 298 * information for this error.
295 */ 299 */
296 String correction; 300 String _correction;
297 301
298 /** 302 /**
299 * The source in which the error occurred, or `null` if unknown. 303 * The source in which the error occurred, or `null` if unknown.
300 */ 304 */
301 Source source; 305 Source source;
302 306
303 /** 307 /**
304 * The character offset from the beginning of the source (zero based) where th e error occurred. 308 * The character offset from the beginning of the source (zero based) where th e error occurred.
305 */ 309 */
306 int offset = 0; 310 int _offset = 0;
307 311
308 /** 312 /**
309 * The number of characters from the offset to the end of the source which enc ompasses the 313 * The number of characters from the offset to the end of the source which enc ompasses the
310 * compilation error. 314 * compilation error.
311 */ 315 */
312 int length = 0; 316 int _length = 0;
313 317
314 /** 318 /**
315 * A flag indicating whether this error can be shown to be a non-issue because of the result of 319 * A flag indicating whether this error can be shown to be a non-issue because of the result of
316 * type propagation. 320 * type propagation.
317 */ 321 */
318 bool isStaticOnly = false; 322 bool isStaticOnly = false;
319 323
320 /** 324 /**
321 * Initialize a newly created analysis error for the specified source. The err or has no location 325 * Initialize a newly created analysis error for the specified source. The err or has no location
322 * information. 326 * information.
323 * 327 *
324 * @param source the source for which the exception occurred 328 * @param source the source for which the exception occurred
325 * @param errorCode the error code to be associated with this error 329 * @param errorCode the error code to be associated with this error
326 * @param arguments the arguments used to build the error message 330 * @param arguments the arguments used to build the error message
327 */ 331 */
328 AnalysisError.con1(Source source, ErrorCode errorCode, List<Object> arguments) { 332 AnalysisError.con1(this.source, this.errorCode, List<Object> arguments) {
329 this.source = source; 333 this._message = JavaString.format(errorCode.message, arguments);
330 this.errorCode = errorCode;
331 this.message = JavaString.format(errorCode.message, arguments);
332 } 334 }
333 335
334 /** 336 /**
335 * Initialize a newly created analysis error for the specified source at the g iven location. 337 * Initialize a newly created analysis error for the specified source at the g iven location.
336 * 338 *
337 * @param source the source for which the exception occurred 339 * @param source the source for which the exception occurred
338 * @param offset the offset of the location of the error 340 * @param offset the offset of the location of the error
339 * @param length the length of the location of the error 341 * @param length the length of the location of the error
340 * @param errorCode the error code to be associated with this error 342 * @param errorCode the error code to be associated with this error
341 * @param arguments the arguments used to build the error message 343 * @param arguments the arguments used to build the error message
342 */ 344 */
343 AnalysisError.con2(Source source, int offset, int length, ErrorCode errorCode, List<Object> arguments) { 345 AnalysisError.con2(this.source, int offset, int length, this.errorCode, List<O bject> arguments) {
344 this.source = source; 346 this._offset = offset;
345 this.offset = offset; 347 this._length = length;
346 this.length = length; 348 this._message = JavaString.format(errorCode.message, arguments);
347 this.errorCode = errorCode;
348 this.message = JavaString.format(errorCode.message, arguments);
349 String correctionTemplate = errorCode.correction; 349 String correctionTemplate = errorCode.correction;
350 if (correctionTemplate != null) { 350 if (correctionTemplate != null) {
351 this.correction = JavaString.format(correctionTemplate, arguments); 351 this._correction = JavaString.format(correctionTemplate, arguments);
352 } 352 }
353 } 353 }
354 354
355 bool operator ==(Object obj) { 355 bool operator ==(Object obj) {
356 if (identical(obj, this)) { 356 if (identical(obj, this)) {
357 return true; 357 return true;
358 } 358 }
359 if (obj is! AnalysisError) { 359 if (obj is! AnalysisError) {
360 return false; 360 return false;
361 } 361 }
362 AnalysisError other = obj as AnalysisError; 362 AnalysisError other = obj as AnalysisError;
363 if (errorCode != other.errorCode) { 363 if (errorCode != other.errorCode) {
364 return false; 364 return false;
365 } 365 }
366 if (offset != other.offset || length != other.length) { 366 if (_offset != other._offset || _length != other._length) {
367 return false; 367 return false;
368 } 368 }
369 if (isStaticOnly != other.isStaticOnly) { 369 if (isStaticOnly != other.isStaticOnly) {
370 return false; 370 return false;
371 } 371 }
372 if (message != other.message) { 372 if (_message != other._message) {
373 return false; 373 return false;
374 } 374 }
375 if (source != other.source) { 375 if (source != other.source) {
376 return false; 376 return false;
377 } 377 }
378 return true; 378 return true;
379 } 379 }
380 380
381 /** 381 /**
382 * Return the correction to be displayed for this error, or `null` if there is no correction
383 * information for this error. The correction should indicate how the user can fix the error.
384 *
385 * @return the template used to create the correction to be displayed for this error
386 */
387 String get correction => _correction;
388
389 /**
390 * Return the number of characters from the offset to the end of the source wh ich encompasses the
391 * compilation error.
392 *
393 * @return the length of the error location
394 */
395 int get length => _length;
396
397 /**
398 * Return the message to be displayed for this error. The message should indic ate what is wrong
399 * and why it is wrong.
400 *
401 * @return the message to be displayed for this error
402 */
403 String get message => _message;
404
405 /**
406 * Return the character offset from the beginning of the source (zero based) w here the error
407 * occurred.
408 *
409 * @return the offset to the start of the error location
410 */
411 int get offset => _offset;
412
413 /**
382 * Return the value of the given property, or `null` if the given property is not defined 414 * Return the value of the given property, or `null` if the given property is not defined
383 * for this error. 415 * for this error.
384 * 416 *
385 * @param property the property whose value is to be returned 417 * @param property the property whose value is to be returned
386 * @return the value of the given property 418 * @return the value of the given property
387 */ 419 */
388 Object getProperty(ErrorProperty property) => null; 420 Object getProperty(ErrorProperty property) => null;
389 421
390 int get hashCode { 422 int get hashCode {
391 int hashCode = offset; 423 int hashCode = _offset;
392 hashCode ^= (message != null) ? message.hashCode : 0; 424 hashCode ^= (_message != null) ? _message.hashCode : 0;
393 hashCode ^= (source != null) ? source.hashCode : 0; 425 hashCode ^= (source != null) ? source.hashCode : 0;
394 return hashCode; 426 return hashCode;
395 } 427 }
396 428
397 String toString() { 429 String toString() {
398 JavaStringBuilder builder = new JavaStringBuilder(); 430 JavaStringBuilder builder = new JavaStringBuilder();
399 builder.append((source != null) ? source.fullName : "<unknown source>"); 431 builder.append((source != null) ? source.fullName : "<unknown source>");
400 builder.append("("); 432 builder.append("(");
401 builder.append(offset); 433 builder.append(_offset);
402 builder.append(".."); 434 builder.append("..");
403 builder.append(offset + length - 1); 435 builder.append(_offset + _length - 1);
404 builder.append("): "); 436 builder.append("): ");
405 builder.append(message); 437 builder.append(_message);
406 return builder.toString(); 438 return builder.toString();
407 } 439 }
408 } 440 }
409 441
410 /** 442 /**
411 * The enumeration `ErrorProperty` defines the properties that can be associated with an 443 * The enumeration `ErrorProperty` defines the properties that can be associated with an
412 * [AnalysisError]. 444 * [AnalysisError].
413 */ 445 */
414 class ErrorProperty extends Enum<ErrorProperty> { 446 class ErrorProperty extends Enum<ErrorProperty> {
415 /** 447 /**
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 UNDEFINED_OPERATOR, 667 UNDEFINED_OPERATOR,
636 UNDEFINED_SETTER, 668 UNDEFINED_SETTER,
637 UNNECESSARY_CAST, 669 UNNECESSARY_CAST,
638 UNNECESSARY_TYPE_CHECK_FALSE, 670 UNNECESSARY_TYPE_CHECK_FALSE,
639 UNNECESSARY_TYPE_CHECK_TRUE, 671 UNNECESSARY_TYPE_CHECK_TRUE,
640 UNUSED_IMPORT]; 672 UNUSED_IMPORT];
641 673
642 /** 674 /**
643 * The template used to create the message to be displayed for this error. 675 * The template used to create the message to be displayed for this error.
644 */ 676 */
645 String _message; 677 final String message;
646 678
647 /** 679 /**
648 * The template used to create the correction to be displayed for this error, or `null` if 680 * The template used to create the correction to be displayed for this error, or `null` if
649 * there is no correction information for this error. 681 * there is no correction information for this error.
650 */ 682 */
651 String correction3; 683 String correction3;
652 684
653 /** 685 /**
654 * Initialize a newly created error code to have the given message. 686 * Initialize a newly created error code to have the given message.
655 * 687 *
656 * @param message the message template used to create the message to be displa yed for the error 688 * @param message the message template used to create the message to be displa yed for the error
657 */ 689 */
658 HintCode.con1(String name, int ordinal, String message) : super(name, ordinal) { 690 HintCode.con1(String name, int ordinal, this.message) : super(name, ordinal);
659 this._message = message;
660 }
661 691
662 /** 692 /**
663 * Initialize a newly created error code to have the given message and correct ion. 693 * Initialize a newly created error code to have the given message and correct ion.
664 * 694 *
665 * @param message the template used to create the message to be displayed for the error 695 * @param message the template used to create the message to be displayed for the error
666 * @param correction the template used to create the correction to be displaye d for the error 696 * @param correction the template used to create the correction to be displaye d for the error
667 */ 697 */
668 HintCode.con2(String name, int ordinal, String message, String correction) : s uper(name, ordinal) { 698 HintCode.con2(String name, int ordinal, this.message, String correction) : sup er(name, ordinal) {
669 this._message = message;
670 this.correction3 = correction; 699 this.correction3 = correction;
671 } 700 }
672 701
673 String get correction => correction3; 702 String get correction => correction3;
674 703
675 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; 704 ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
676 705
677 String get message => _message;
678
679 ErrorType get type => ErrorType.HINT; 706 ErrorType get type => ErrorType.HINT;
680 } 707 }
681 708
682 /** 709 /**
683 * The interface `ErrorCode` defines the behavior common to objects representing error codes 710 * The interface `ErrorCode` defines the behavior common to objects representing error codes
684 * associated with [AnalysisError]. 711 * associated with [AnalysisError].
685 * 712 *
686 * Generally, we want to provide messages that consist of three sentences: 1. wh at is wrong, 2. why 713 * Generally, we want to provide messages that consist of three sentences: 1. wh at is wrong, 2. why
687 * is it wrong, and 3. how do I fix it. However, we combine the first two in the result of 714 * is it wrong, and 3. how do I fix it. However, we combine the first two in the result of
688 * [getMessage] and the last in the result of [getCorrection]. 715 * [getMessage] and the last in the result of [getCorrection].
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 HINT, 800 HINT,
774 COMPILE_TIME_ERROR, 801 COMPILE_TIME_ERROR,
775 PUB_SUGGESTION, 802 PUB_SUGGESTION,
776 STATIC_WARNING, 803 STATIC_WARNING,
777 STATIC_TYPE_WARNING, 804 STATIC_TYPE_WARNING,
778 SYNTACTIC_ERROR]; 805 SYNTACTIC_ERROR];
779 806
780 /** 807 /**
781 * The severity of this type of error. 808 * The severity of this type of error.
782 */ 809 */
783 ErrorSeverity severity; 810 final ErrorSeverity severity;
784 811
785 /** 812 /**
786 * Initialize a newly created error type to have the given severity. 813 * Initialize a newly created error type to have the given severity.
787 * 814 *
788 * @param severity the severity of this type of error 815 * @param severity the severity of this type of error
789 */ 816 */
790 ErrorType(String name, int ordinal, ErrorSeverity severity) : super(name, ordi nal) { 817 ErrorType(String name, int ordinal, this.severity) : super(name, ordinal);
791 this.severity = severity;
792 }
793 818
794 String get displayName => name.toLowerCase().replaceAll('_', ' '); 819 String get displayName => name.toLowerCase().replaceAll('_', ' ');
795 } 820 }
796 821
797 /** 822 /**
798 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi le time 823 * The enumeration `CompileTimeErrorCode` defines the error codes used for compi le time
799 * errors. The convention for this class is for the name of the error code to in dicate the problem 824 * errors. The convention for this class is for the name of the error code to in dicate the problem
800 * that caused the error to be generated and for the error message to explain wh at is wrong and, 825 * that caused the error to be generated and for the error message to explain wh at is wrong and,
801 * when appropriate, how the problem can be corrected. 826 * when appropriate, how the problem can be corrected.
802 * 827 *
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 UNDEFINED_NAMED_PARAMETER, 2131 UNDEFINED_NAMED_PARAMETER,
2107 URI_DOES_NOT_EXIST, 2132 URI_DOES_NOT_EXIST,
2108 URI_WITH_INTERPOLATION, 2133 URI_WITH_INTERPOLATION,
2109 WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, 2134 WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR,
2110 WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, 2135 WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS,
2111 WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]; 2136 WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER];
2112 2137
2113 /** 2138 /**
2114 * The template used to create the message to be displayed for this error. 2139 * The template used to create the message to be displayed for this error.
2115 */ 2140 */
2116 String _message; 2141 final String message;
2117 2142
2118 /** 2143 /**
2119 * The template used to create the correction to be displayed for this error, or `null` if 2144 * The template used to create the correction to be displayed for this error, or `null` if
2120 * there is no correction information for this error. 2145 * there is no correction information for this error.
2121 */ 2146 */
2122 String correction2; 2147 String correction2;
2123 2148
2124 /** 2149 /**
2125 * Initialize a newly created error code to have the given message. 2150 * Initialize a newly created error code to have the given message.
2126 * 2151 *
2127 * @param message the message template used to create the message to be displa yed for the error 2152 * @param message the message template used to create the message to be displa yed for the error
2128 */ 2153 */
2129 CompileTimeErrorCode.con1(String name, int ordinal, String message) : super(na me, ordinal) { 2154 CompileTimeErrorCode.con1(String name, int ordinal, this.message) : super(name , ordinal);
2130 this._message = message;
2131 }
2132 2155
2133 /** 2156 /**
2134 * Initialize a newly created error code to have the given message and correct ion. 2157 * Initialize a newly created error code to have the given message and correct ion.
2135 * 2158 *
2136 * @param message the template used to create the message to be displayed for the error 2159 * @param message the template used to create the message to be displayed for the error
2137 * @param correction the template used to create the correction to be displaye d for the error 2160 * @param correction the template used to create the correction to be displaye d for the error
2138 */ 2161 */
2139 CompileTimeErrorCode.con2(String name, int ordinal, String message, String cor rection) : super(name, ordinal) { 2162 CompileTimeErrorCode.con2(String name, int ordinal, this.message, String corre ction) : super(name, ordinal) {
2140 this._message = message;
2141 this.correction2 = correction; 2163 this.correction2 = correction;
2142 } 2164 }
2143 2165
2144 String get correction => correction2; 2166 String get correction => correction2;
2145 2167
2146 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity; 2168 ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
2147 2169
2148 String get message => _message;
2149
2150 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; 2170 ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
2151 } 2171 }
2152 2172
2153 /** 2173 /**
2154 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin g deviations 2174 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin g deviations
2155 * from pub best practices. The convention for this class is for the name of the bad practice to 2175 * from pub best practices. The convention for this class is for the name of the bad practice to
2156 * indicate the problem that caused the suggestion to be generated and for the m essage to explain 2176 * indicate the problem that caused the suggestion to be generated and for the m essage to explain
2157 * what is wrong and, when appropriate, how the situation can be corrected. 2177 * what is wrong and, when appropriate, how the situation can be corrected.
2158 */ 2178 */
2159 class PubSuggestionCode extends Enum<PubSuggestionCode> implements ErrorCode { 2179 class PubSuggestionCode extends Enum<PubSuggestionCode> implements ErrorCode {
(...skipping 21 matching lines...) Expand all
2181 static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSugges tionCode.con1('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not contain '..'"); 2201 static final PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = new PubSugges tionCode.con1('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should not contain '..'");
2182 2202
2183 static final List<PubSuggestionCode> values = [ 2203 static final List<PubSuggestionCode> values = [
2184 FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, 2204 FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
2185 FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, 2205 FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
2186 PACKAGE_IMPORT_CONTAINS_DOT_DOT]; 2206 PACKAGE_IMPORT_CONTAINS_DOT_DOT];
2187 2207
2188 /** 2208 /**
2189 * The template used to create the message to be displayed for this error. 2209 * The template used to create the message to be displayed for this error.
2190 */ 2210 */
2191 String _message; 2211 final String message;
2192 2212
2193 /** 2213 /**
2194 * The template used to create the correction to be displayed for this error, or `null` if 2214 * The template used to create the correction to be displayed for this error, or `null` if
2195 * there is no correction information for this error. 2215 * there is no correction information for this error.
2196 */ 2216 */
2197 String correction5; 2217 String correction5;
2198 2218
2199 /** 2219 /**
2200 * Initialize a newly created error code to have the given message. 2220 * Initialize a newly created error code to have the given message.
2201 * 2221 *
2202 * @param message the message template used to create the message to be displa yed for the error 2222 * @param message the message template used to create the message to be displa yed for the error
2203 */ 2223 */
2204 PubSuggestionCode.con1(String name, int ordinal, String message) : super(name, ordinal) { 2224 PubSuggestionCode.con1(String name, int ordinal, this.message) : super(name, o rdinal);
2205 this._message = message;
2206 }
2207 2225
2208 /** 2226 /**
2209 * Initialize a newly created error code to have the given message and correct ion. 2227 * Initialize a newly created error code to have the given message and correct ion.
2210 * 2228 *
2211 * @param message the template used to create the message to be displayed for the error 2229 * @param message the template used to create the message to be displayed for the error
2212 * @param correction the template used to create the correction to be displaye d for the error 2230 * @param correction the template used to create the correction to be displaye d for the error
2213 */ 2231 */
2214 PubSuggestionCode.con2(String name, int ordinal, String message, String correc tion) : super(name, ordinal) { 2232 PubSuggestionCode.con2(String name, int ordinal, this.message, String correcti on) : super(name, ordinal) {
2215 this._message = message;
2216 this.correction5 = correction; 2233 this.correction5 = correction;
2217 } 2234 }
2218 2235
2219 String get correction => correction5; 2236 String get correction => correction5;
2220 2237
2221 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity; 2238 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity;
2222 2239
2223 String get message => _message;
2224
2225 ErrorType get type => ErrorType.PUB_SUGGESTION; 2240 ErrorType get type => ErrorType.PUB_SUGGESTION;
2226 } 2241 }
2227 2242
2228 /** 2243 /**
2229 * The enumeration `StaticWarningCode` defines the error codes used for static w arnings. The 2244 * The enumeration `StaticWarningCode` defines the error codes used for static w arnings. The
2230 * convention for this class is for the name of the error code to indicate the p roblem that caused 2245 * convention for this class is for the name of the error code to indicate the p roblem that caused
2231 * the error to be generated and for the error message to explain what is wrong and, when 2246 * the error to be generated and for the error message to explain what is wrong and, when
2232 * appropriate, how the problem can be corrected. 2247 * appropriate, how the problem can be corrected.
2233 * 2248 *
2234 * @coverage dart.engine.error 2249 * @coverage dart.engine.error
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 UNDEFINED_CLASS_BOOLEAN, 3091 UNDEFINED_CLASS_BOOLEAN,
3077 UNDEFINED_GETTER, 3092 UNDEFINED_GETTER,
3078 UNDEFINED_IDENTIFIER, 3093 UNDEFINED_IDENTIFIER,
3079 UNDEFINED_NAMED_PARAMETER, 3094 UNDEFINED_NAMED_PARAMETER,
3080 UNDEFINED_SETTER, 3095 UNDEFINED_SETTER,
3081 UNDEFINED_STATIC_METHOD_OR_GETTER]; 3096 UNDEFINED_STATIC_METHOD_OR_GETTER];
3082 3097
3083 /** 3098 /**
3084 * The template used to create the message to be displayed for this error. 3099 * The template used to create the message to be displayed for this error.
3085 */ 3100 */
3086 String _message; 3101 final String message;
3087 3102
3088 /** 3103 /**
3089 * The template used to create the correction to be displayed for this error, or `null` if 3104 * The template used to create the correction to be displayed for this error, or `null` if
3090 * there is no correction information for this error. 3105 * there is no correction information for this error.
3091 */ 3106 */
3092 String correction7; 3107 String correction7;
3093 3108
3094 /** 3109 /**
3095 * Initialize a newly created error code to have the given message. 3110 * Initialize a newly created error code to have the given message.
3096 * 3111 *
3097 * @param message the message template used to create the message to be displa yed for the error 3112 * @param message the message template used to create the message to be displa yed for the error
3098 */ 3113 */
3099 StaticWarningCode.con1(String name, int ordinal, String message) : super(name, ordinal) { 3114 StaticWarningCode.con1(String name, int ordinal, this.message) : super(name, o rdinal);
3100 this._message = message;
3101 }
3102 3115
3103 /** 3116 /**
3104 * Initialize a newly created error code to have the given message and correct ion. 3117 * Initialize a newly created error code to have the given message and correct ion.
3105 * 3118 *
3106 * @param message the template used to create the message to be displayed for the error 3119 * @param message the template used to create the message to be displayed for the error
3107 * @param correction the template used to create the correction to be displaye d for the error 3120 * @param correction the template used to create the correction to be displaye d for the error
3108 */ 3121 */
3109 StaticWarningCode.con2(String name, int ordinal, String message, String correc tion) : super(name, ordinal) { 3122 StaticWarningCode.con2(String name, int ordinal, this.message, String correcti on) : super(name, ordinal) {
3110 this._message = message;
3111 this.correction7 = correction; 3123 this.correction7 = correction;
3112 } 3124 }
3113 3125
3114 String get correction => correction7; 3126 String get correction => correction7;
3115 3127
3116 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; 3128 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity;
3117 3129
3118 String get message => _message;
3119
3120 ErrorType get type => ErrorType.STATIC_WARNING; 3130 ErrorType get type => ErrorType.STATIC_WARNING;
3121 } 3131 }
3122 3132
3123 /** 3133 /**
3124 * The interface `AnalysisErrorListener` defines the behavior of objects that li sten for 3134 * The interface `AnalysisErrorListener` defines the behavior of objects that li sten for
3125 * [AnalysisError] being produced by the analysis engine. 3135 * [AnalysisError] being produced by the analysis engine.
3126 * 3136 *
3127 * @coverage dart.engine.error 3137 * @coverage dart.engine.error
3128 */ 3138 */
3129 abstract class AnalysisErrorListener { 3139 abstract class AnalysisErrorListener {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3168 * 3178 *
3169 * @param uri the URI pointing to a non-existent file 3179 * @param uri the URI pointing to a non-existent file
3170 */ 3180 */
3171 static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode.con1('UR I_DOES_NOT_EXIST', 1, "Target of URI does not exist: '%s'"); 3181 static final HtmlWarningCode URI_DOES_NOT_EXIST = new HtmlWarningCode.con1('UR I_DOES_NOT_EXIST', 1, "Target of URI does not exist: '%s'");
3172 3182
3173 static final List<HtmlWarningCode> values = [INVALID_URI, URI_DOES_NOT_EXIST]; 3183 static final List<HtmlWarningCode> values = [INVALID_URI, URI_DOES_NOT_EXIST];
3174 3184
3175 /** 3185 /**
3176 * The template used to create the message to be displayed for this error. 3186 * The template used to create the message to be displayed for this error.
3177 */ 3187 */
3178 String _message; 3188 final String message;
3179 3189
3180 /** 3190 /**
3181 * The template used to create the correction to be displayed for this error, or `null` if 3191 * The template used to create the correction to be displayed for this error, or `null` if
3182 * there is no correction information for this error. 3192 * there is no correction information for this error.
3183 */ 3193 */
3184 String correction4; 3194 String correction4;
3185 3195
3186 /** 3196 /**
3187 * Initialize a newly created error code to have the given message. 3197 * Initialize a newly created error code to have the given message.
3188 * 3198 *
3189 * @param message the message template used to create the message to be displa yed for the error 3199 * @param message the message template used to create the message to be displa yed for the error
3190 */ 3200 */
3191 HtmlWarningCode.con1(String name, int ordinal, String message) : super(name, o rdinal) { 3201 HtmlWarningCode.con1(String name, int ordinal, this.message) : super(name, ord inal);
3192 this._message = message;
3193 }
3194 3202
3195 /** 3203 /**
3196 * Initialize a newly created error code to have the given message and correct ion. 3204 * Initialize a newly created error code to have the given message and correct ion.
3197 * 3205 *
3198 * @param message the template used to create the message to be displayed for the error 3206 * @param message the template used to create the message to be displayed for the error
3199 * @param correction the template used to create the correction to be displaye d for the error 3207 * @param correction the template used to create the correction to be displaye d for the error
3200 */ 3208 */
3201 HtmlWarningCode.con2(String name, int ordinal, String message, String correcti on) : super(name, ordinal) { 3209 HtmlWarningCode.con2(String name, int ordinal, this.message, String correction ) : super(name, ordinal) {
3202 this._message = message;
3203 this.correction4 = correction; 3210 this.correction4 = correction;
3204 } 3211 }
3205 3212
3206 String get correction => correction4; 3213 String get correction => correction4;
3207 3214
3208 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; 3215 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
3209 3216
3210 String get message => _message;
3211
3212 ErrorType get type => ErrorType.STATIC_WARNING; 3217 ErrorType get type => ErrorType.STATIC_WARNING;
3213 } 3218 }
3214 3219
3215 /** 3220 /**
3216 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat ic type 3221 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat ic type
3217 * warnings. The convention for this class is for the name of the error code to indicate the problem 3222 * warnings. The convention for this class is for the name of the error code to indicate the problem
3218 * that caused the error to be generated and for the error message to explain wh at is wrong and, 3223 * that caused the error to be generated and for the error message to explain wh at is wrong and,
3219 * when appropriate, how the problem can be corrected. 3224 * when appropriate, how the problem can be corrected.
3220 * 3225 *
3221 * @coverage dart.engine.error 3226 * @coverage dart.engine.error
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
3500 UNDEFINED_METHOD, 3505 UNDEFINED_METHOD,
3501 UNDEFINED_OPERATOR, 3506 UNDEFINED_OPERATOR,
3502 UNDEFINED_SETTER, 3507 UNDEFINED_SETTER,
3503 UNDEFINED_SUPER_METHOD, 3508 UNDEFINED_SUPER_METHOD,
3504 UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER, 3509 UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
3505 WRONG_NUMBER_OF_TYPE_ARGUMENTS]; 3510 WRONG_NUMBER_OF_TYPE_ARGUMENTS];
3506 3511
3507 /** 3512 /**
3508 * The template used to create the message to be displayed for this error. 3513 * The template used to create the message to be displayed for this error.
3509 */ 3514 */
3510 String _message; 3515 final String message;
3511 3516
3512 /** 3517 /**
3513 * The template used to create the correction to be displayed for this error, or `null` if 3518 * The template used to create the correction to be displayed for this error, or `null` if
3514 * there is no correction information for this error. 3519 * there is no correction information for this error.
3515 */ 3520 */
3516 String correction6; 3521 String correction6;
3517 3522
3518 /** 3523 /**
3519 * Initialize a newly created error code to have the given message. 3524 * Initialize a newly created error code to have the given message.
3520 * 3525 *
3521 * @param message the message template used to create the message to be displa yed for the error 3526 * @param message the message template used to create the message to be displa yed for the error
3522 */ 3527 */
3523 StaticTypeWarningCode.con1(String name, int ordinal, String message) : super(n ame, ordinal) { 3528 StaticTypeWarningCode.con1(String name, int ordinal, this.message) : super(nam e, ordinal);
3524 this._message = message;
3525 }
3526 3529
3527 /** 3530 /**
3528 * Initialize a newly created error code to have the given message and correct ion. 3531 * Initialize a newly created error code to have the given message and correct ion.
3529 * 3532 *
3530 * @param message the template used to create the message to be displayed for the error 3533 * @param message the template used to create the message to be displayed for the error
3531 * @param correction the template used to create the correction to be displaye d for the error 3534 * @param correction the template used to create the correction to be displaye d for the error
3532 */ 3535 */
3533 StaticTypeWarningCode.con2(String name, int ordinal, String message, String co rrection) : super(name, ordinal) { 3536 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr ection) : super(name, ordinal) {
3534 this._message = message;
3535 this.correction6 = correction; 3537 this.correction6 = correction;
3536 } 3538 }
3537 3539
3538 String get correction => correction6; 3540 String get correction => correction6;
3539 3541
3540 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; 3542 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity;
3541 3543
3542 String get message => _message;
3543
3544 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; 3544 ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
3545 } 3545 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698