OLD | NEW |
| 1 library angular2.src.transform; |
| 2 |
1 import 'package:analyzer/src/generated/element.dart'; | 3 import 'package:analyzer/src/generated/element.dart'; |
2 import 'package:path/path.dart' as path; | 4 import 'package:path/path.dart' as path; |
3 | 5 |
4 import 'annotation_processor.dart'; | 6 import 'annotation_processor.dart'; |
5 | 7 |
6 class ImportTraversal { | 8 class ImportTraversal { |
7 final AnnotationMatcher _annotationMatcher; | 9 final AnnotationMatcher _annotationMatcher; |
8 | 10 |
9 ImportTraversal(this._annotationMatcher); | 11 ImportTraversal(this._annotationMatcher); |
10 | 12 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 93 } |
92 | 94 |
93 // And finally compare based on the relative uri if both are file paths. | 95 // And finally compare based on the relative uri if both are file paths. |
94 var aUri = path.relative(a.source.uri.path, | 96 var aUri = path.relative(a.source.uri.path, |
95 from: path.dirname(library.source.uri.path)); | 97 from: path.dirname(library.source.uri.path)); |
96 var bUri = path.relative(b.source.uri.path, | 98 var bUri = path.relative(b.source.uri.path, |
97 from: path.dirname(library.source.uri.path)); | 99 from: path.dirname(library.source.uri.path)); |
98 return aUri.compareTo(bUri); | 100 return aUri.compareTo(bUri); |
99 })).map((import) => import.importedLibrary); | 101 })).map((import) => import.importedLibrary); |
100 } | 102 } |
OLD | NEW |