| 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 driver; | 5 library driver; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:math'; | 9 import 'dart:math'; |
| 10 | 10 |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 negatable: false); | 336 negatable: false); |
| 337 parser.addOption( | 337 parser.addOption( |
| 338 FILE_READ_MODE, | 338 FILE_READ_MODE, |
| 339 help: "an option of the ways files can be read from disk, " + | 339 help: "an option of the ways files can be read from disk, " + |
| 340 "some clients normalize end of line characters which would make " + | 340 "some clients normalize end of line characters which would make " + |
| 341 "the file offset and range information incorrect.", | 341 "the file offset and range information incorrect.", |
| 342 allowed: ["as-is", "normalize-eol-always"], | 342 allowed: ["as-is", "normalize-eol-always"], |
| 343 allowedHelp: { | 343 allowedHelp: { |
| 344 "as-is": "file contents are read as-is, no file changes occur", | 344 "as-is": "file contents are read as-is, no file changes occur", |
| 345 "normalize-eol-always": | 345 "normalize-eol-always": |
| 346 "file contents normalize the end of line characters to the single char
acter new line `\n`" | 346 r'file contents normalize the end of line characters to the single cha
racter new line `\n`' |
| 347 }, defaultsTo: "as-is"); | 347 }, defaultsTo: "as-is"); |
| 348 | 348 |
| 349 return parser; | 349 return parser; |
| 350 } | 350 } |
| 351 | 351 |
| 352 /** | 352 /** |
| 353 * Print information about how to use the server. | 353 * Print information about how to use the server. |
| 354 */ | 354 */ |
| 355 void _printUsage(ArgParser parser) { | 355 void _printUsage(ArgParser parser) { |
| 356 print('Usage: $BINARY_NAME [flags]'); | 356 print('Usage: $BINARY_NAME [flags]'); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 383 uuidFile.parent.createSync(recursive: true); | 383 uuidFile.parent.createSync(recursive: true); |
| 384 uuidFile.writeAsStringSync(uuid); | 384 uuidFile.writeAsStringSync(uuid); |
| 385 } catch (exception, stackTrace) { | 385 } catch (exception, stackTrace) { |
| 386 service.logPriorityException(exception, stackTrace); | 386 service.logPriorityException(exception, stackTrace); |
| 387 // Slightly alter the uuid to indicate it was not persisted | 387 // Slightly alter the uuid to indicate it was not persisted |
| 388 uuid = 'temp-$uuid'; | 388 uuid = 'temp-$uuid'; |
| 389 } | 389 } |
| 390 return uuid; | 390 return uuid; |
| 391 } | 391 } |
| 392 } | 392 } |
| OLD | NEW |