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

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

Issue 137863002: Issue 8742. Preserve leading line comments during java2dart translation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Test for block-style comment translation. Created 6 years, 11 months 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 // 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 String correctionTemplate = errorCode.correction; 433 String correctionTemplate = errorCode.correction;
434 if (correctionTemplate != null) { 434 if (correctionTemplate != null) {
435 this._correction = JavaString.format(correctionTemplate, arguments); 435 this._correction = JavaString.format(correctionTemplate, arguments);
436 } 436 }
437 } 437 }
438 438
439 bool operator ==(Object obj) { 439 bool operator ==(Object obj) {
440 if (identical(obj, this)) { 440 if (identical(obj, this)) {
441 return true; 441 return true;
442 } 442 }
443 // prepare other AnalysisError
443 if (obj is! AnalysisError) { 444 if (obj is! AnalysisError) {
444 return false; 445 return false;
445 } 446 }
446 AnalysisError other = obj as AnalysisError; 447 AnalysisError other = obj as AnalysisError;
448 // Quick checks.
447 if (errorCode != other.errorCode) { 449 if (errorCode != other.errorCode) {
448 return false; 450 return false;
449 } 451 }
450 if (_offset != other._offset || _length != other._length) { 452 if (_offset != other._offset || _length != other._length) {
451 return false; 453 return false;
452 } 454 }
453 if (isStaticOnly != other.isStaticOnly) { 455 if (isStaticOnly != other.isStaticOnly) {
454 return false; 456 return false;
455 } 457 }
458 // Deep checks.
456 if (_message != other._message) { 459 if (_message != other._message) {
457 return false; 460 return false;
458 } 461 }
459 if (source != other.source) { 462 if (source != other.source) {
460 return false; 463 return false;
461 } 464 }
465 // OK
462 return true; 466 return true;
463 } 467 }
464 468
465 /** 469 /**
466 * Return the correction to be displayed for this error, or `null` if there is no correction 470 * Return the correction to be displayed for this error, or `null` if there is no correction
467 * information for this error. The correction should indicate how the user can fix the error. 471 * information for this error. The correction should indicate how the user can fix the error.
468 * 472 *
469 * @return the template used to create the correction to be displayed for this error 473 * @return the template used to create the correction to be displayed for this error
470 */ 474 */
471 String get correction => _correction; 475 String get correction => _correction;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 } 515 }
512 516
513 String toString() { 517 String toString() {
514 JavaStringBuilder builder = new JavaStringBuilder(); 518 JavaStringBuilder builder = new JavaStringBuilder();
515 builder.append((source != null) ? source.fullName : "<unknown source>"); 519 builder.append((source != null) ? source.fullName : "<unknown source>");
516 builder.append("("); 520 builder.append("(");
517 builder.append(_offset); 521 builder.append(_offset);
518 builder.append(".."); 522 builder.append("..");
519 builder.append(_offset + _length - 1); 523 builder.append(_offset + _length - 1);
520 builder.append("): "); 524 builder.append("): ");
525 //builder.append("(" + lineNumber + ":" + columnNumber + "): ");
521 builder.append(_message); 526 builder.append(_message);
522 return builder.toString(); 527 return builder.toString();
523 } 528 }
524 } 529 }
525 530
526 /** 531 /**
527 * The enumeration `ErrorProperty` defines the properties that can be associated with an 532 * The enumeration `ErrorProperty` defines the properties that can be associated with an
528 * [AnalysisError]. 533 * [AnalysisError].
529 */ 534 */
530 class ErrorProperty extends Enum<ErrorProperty> { 535 class ErrorProperty extends Enum<ErrorProperty> {
(...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after
3636 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr ection) : super(name, ordinal) { 3641 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr ection) : super(name, ordinal) {
3637 this.correction7 = correction; 3642 this.correction7 = correction;
3638 } 3643 }
3639 3644
3640 String get correction => correction7; 3645 String get correction => correction7;
3641 3646
3642 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; 3647 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity;
3643 3648
3644 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; 3649 ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
3645 } 3650 }
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