| OLD | NEW | 
|    1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file |    1 // Copyright (c) 2012, 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('package'); |    5 #library('package'); | 
|    6  |    6  | 
|    7 #import('io.dart'); |    7 #import('io.dart'); | 
|    8 #import('pubspec.dart'); |    8 #import('pubspec.dart'); | 
|    9 #import('source.dart'); |    9 #import('source.dart'); | 
|   10 #import('source_registry.dart'); |   10 #import('source_registry.dart'); | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
|   36   } |   36   } | 
|   37  |   37  | 
|   38   /** |   38   /** | 
|   39    * The path to the directory containing the package. |   39    * The path to the directory containing the package. | 
|   40    */ |   40    */ | 
|   41   final String dir; |   41   final String dir; | 
|   42  |   42  | 
|   43   /** |   43   /** | 
|   44    * The name of the package. |   44    * The name of the package. | 
|   45    */ |   45    */ | 
|   46   String get name() { |   46   String get name { | 
|   47     if (pubspec.name != null) return pubspec.name; |   47     if (pubspec.name != null) return pubspec.name; | 
|   48     if (dir != null) return basename(dir); |   48     if (dir != null) return basename(dir); | 
|   49     return null; |   49     return null; | 
|   50   } |   50   } | 
|   51  |   51  | 
|   52   /** |   52   /** | 
|   53    * The package's version. |   53    * The package's version. | 
|   54    */ |   54    */ | 
|   55   Version get version => pubspec.version; |   55   Version get version => pubspec.version; | 
|   56  |   56  | 
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  190  |  190  | 
|  191   String toString() => "$name $constraint from $source ($description)"; |  191   String toString() => "$name $constraint from $source ($description)"; | 
|  192  |  192  | 
|  193   /** |  193   /** | 
|  194    * Returns a [PackageId] generated from this [PackageRef] with the given |  194    * Returns a [PackageId] generated from this [PackageRef] with the given | 
|  195    * concrete version. |  195    * concrete version. | 
|  196    */ |  196    */ | 
|  197   PackageId atVersion(Version version) => |  197   PackageId atVersion(Version version) => | 
|  198     new PackageId(source, version, description); |  198     new PackageId(source, version, description); | 
|  199 } |  199 } | 
| OLD | NEW |