| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 elements.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'elements.dart'; | 7 import 'elements.dart'; |
| 8 import '../../compiler.dart' as api; | 8 import '../../compiler.dart' as api; |
| 9 import '../tree/tree.dart'; | 9 import '../tree/tree.dart'; |
| 10 import '../util/util.dart'; | 10 import '../util/util.dart'; |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 */ | 964 */ |
| 965 String getLibraryName() { | 965 String getLibraryName() { |
| 966 if (libraryTag == null) return ''; | 966 if (libraryTag == null) return ''; |
| 967 return libraryTag.name.toString(); | 967 return libraryTag.name.toString(); |
| 968 } | 968 } |
| 969 | 969 |
| 970 /** | 970 /** |
| 971 * Returns the library name (as defined by the library tag) or for script | 971 * Returns the library name (as defined by the library tag) or for script |
| 972 * (which have no library tag) the script file name. The latter case is used | 972 * (which have no library tag) the script file name. The latter case is used |
| 973 * to private 'library name' for scripts to use for instance in dartdoc. | 973 * to private 'library name' for scripts to use for instance in dartdoc. |
| 974 * |
| 975 * Note: the returned filename will still be escaped ("a%20b.dart" instead of |
| 976 * "a b.dart"). |
| 974 */ | 977 */ |
| 975 String getLibraryOrScriptName() { | 978 String getLibraryOrScriptName() { |
| 976 if (libraryTag != null) { | 979 if (libraryTag != null) { |
| 977 return libraryTag.name.toString(); | 980 return libraryTag.name.toString(); |
| 978 } else { | 981 } else { |
| 979 // Use the file name as script name. | 982 // Use the file name as script name. |
| 980 String path = canonicalUri.path; | 983 String path = canonicalUri.path; |
| 981 return path.substring(path.lastIndexOf('/') + 1); | 984 return path.substring(path.lastIndexOf('/') + 1); |
| 982 } | 985 } |
| 983 } | 986 } |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2441 | 2444 |
| 2442 MetadataAnnotation ensureResolved(Compiler compiler) { | 2445 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2443 if (resolutionState == STATE_NOT_STARTED) { | 2446 if (resolutionState == STATE_NOT_STARTED) { |
| 2444 compiler.resolver.resolveMetadataAnnotation(this); | 2447 compiler.resolver.resolveMetadataAnnotation(this); |
| 2445 } | 2448 } |
| 2446 return this; | 2449 return this; |
| 2447 } | 2450 } |
| 2448 | 2451 |
| 2449 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2452 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2450 } | 2453 } |
| OLD | NEW |