| 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 web_ui.src.utils; | 5 library web_ui.src.utils; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:path/path.dart' show Builder; | 9 import 'package:path/path.dart' show Context; |
| 10 | 10 |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * An instance of the path library builder. We could just use the default | 13 * An instance of the path library builder. We could just use the default |
| 14 * builder in path, but we add this indirection to make it possible to run | 14 * builder in path, but we add this indirection to make it possible to run |
| 15 * unittest for windows paths. | 15 * unittest for windows paths. |
| 16 */ | 16 */ |
| 17 Builder path = new Builder(); | 17 Context path = new Context(); |
| 18 | 18 |
| 19 /** Convert a OS specific path into a url. */ | 19 /** Convert a OS specific path into a url. */ |
| 20 String pathToUrl(String relPath) => | 20 String pathToUrl(String relPath) => |
| 21 (path.separator == '/') ? relPath : path.split(relPath).join('/'); | 21 (path.separator == '/') ? relPath : path.split(relPath).join('/'); |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Converts a string name with hyphens into an identifier, by removing hyphens | 24 * Converts a string name with hyphens into an identifier, by removing hyphens |
| 25 * and capitalizing the following letter. Optionally [startUppercase] to | 25 * and capitalizing the following letter. Optionally [startUppercase] to |
| 26 * captialize the first letter. | 26 * captialize the first letter. |
| 27 */ | 27 */ |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 if (message != null) { | 297 if (message != null) { |
| 298 additionalMessage = '\nInternal message: $message'; | 298 additionalMessage = '\nInternal message: $message'; |
| 299 } | 299 } |
| 300 return "We're sorry, you've just found a compiler bug. " | 300 return "We're sorry, you've just found a compiler bug. " |
| 301 'You can report it at:\n' | 301 'You can report it at:\n' |
| 302 'https://github.com/dart-lang/web-ui/issues/new\n' | 302 'https://github.com/dart-lang/web-ui/issues/new\n' |
| 303 'Thanks in advance for the bug report! It will help us improve Web UI.' | 303 'Thanks in advance for the bug report! It will help us improve Web UI.' |
| 304 '$additionalMessage'; | 304 '$additionalMessage'; |
| 305 } | 305 } |
| 306 } | 306 } |
| OLD | NEW |