| 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 library analyzer.test.generated.test_support; | 5 library analyzer.test.generated.test_support; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart' | 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode, SimpleIdentifier; |
| 10 show AstNode, SimpleIdentifier; | |
| 11 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| 12 import 'package:analyzer/dart/element/type.dart'; | 11 import 'package:analyzer/dart/element/type.dart'; |
| 13 import 'package:analyzer/src/dart/ast/utilities.dart'; | 12 import 'package:analyzer/src/dart/ast/utilities.dart'; |
| 14 import 'package:analyzer/src/generated/engine.dart'; | 13 import 'package:analyzer/src/generated/engine.dart'; |
| 15 import 'package:analyzer/src/generated/error.dart'; | 14 import 'package:analyzer/src/generated/error.dart'; |
| 16 import 'package:analyzer/src/generated/java_core.dart'; | 15 import 'package:analyzer/src/generated/java_core.dart'; |
| 17 import 'package:analyzer/src/generated/java_engine.dart'; | 16 import 'package:analyzer/src/generated/java_engine.dart'; |
| 18 import 'package:analyzer/src/generated/source.dart'; | 17 import 'package:analyzer/src/generated/source.dart'; |
| 19 import 'package:plugin/manager.dart'; | 18 import 'package:plugin/manager.dart'; |
| 20 import 'package:plugin/plugin.dart'; | 19 import 'package:plugin/plugin.dart'; |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 @override | 639 @override |
| 641 String toString() => '$_name'; | 640 String toString() => '$_name'; |
| 642 } | 641 } |
| 643 | 642 |
| 644 class TestSourceWithUri extends TestSource { | 643 class TestSourceWithUri extends TestSource { |
| 645 final Uri uri; | 644 final Uri uri; |
| 646 | 645 |
| 647 TestSourceWithUri(String path, this.uri, [String content]) | 646 TestSourceWithUri(String path, this.uri, [String content]) |
| 648 : super(path, content); | 647 : super(path, content); |
| 649 | 648 |
| 649 String get encoding => uri.toString(); |
| 650 |
| 650 UriKind get uriKind { | 651 UriKind get uriKind { |
| 651 if (uri == null) { | 652 if (uri == null) { |
| 652 return UriKind.FILE_URI; | 653 return UriKind.FILE_URI; |
| 653 } else if (uri.scheme == 'dart') { | 654 } else if (uri.scheme == 'dart') { |
| 654 return UriKind.DART_URI; | 655 return UriKind.DART_URI; |
| 655 } else if (uri.scheme == 'package') { | 656 } else if (uri.scheme == 'package') { |
| 656 return UriKind.PACKAGE_URI; | 657 return UriKind.PACKAGE_URI; |
| 657 } | 658 } |
| 658 return UriKind.FILE_URI; | 659 return UriKind.FILE_URI; |
| 659 } | 660 } |
| 660 | 661 |
| 661 bool operator ==(Object other) { | 662 bool operator ==(Object other) { |
| 662 if (other is TestSource) { | 663 if (other is TestSource) { |
| 663 return other.uri == uri; | 664 return other.uri == uri; |
| 664 } | 665 } |
| 665 return false; | 666 return false; |
| 666 } | 667 } |
| 667 | 668 |
| 668 Uri resolveRelativeUri(Uri uri) { | 669 Uri resolveRelativeUri(Uri uri) { |
| 669 return this.uri.resolveUri(uri); | 670 return this.uri.resolveUri(uri); |
| 670 } | 671 } |
| 671 } | 672 } |
| OLD | NEW |