| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.sdk.io; | 8 library engine.sdk.io; |
| 9 | 9 |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 * discovered. | 193 * discovered. |
| 194 */ | 194 */ |
| 195 String _sdkVersion; | 195 String _sdkVersion; |
| 196 | 196 |
| 197 /** | 197 /** |
| 198 * The file containing the dart2js executable. | 198 * The file containing the dart2js executable. |
| 199 */ | 199 */ |
| 200 JavaFile _dart2jsExecutable; | 200 JavaFile _dart2jsExecutable; |
| 201 | 201 |
| 202 /** | 202 /** |
| 203 * The file containing the dart formatter executable. | |
| 204 */ | |
| 205 JavaFile _dartFmtExecutable; | |
| 206 | |
| 207 /** | |
| 208 * The file containing the Dartium executable. | 203 * The file containing the Dartium executable. |
| 209 */ | 204 */ |
| 210 JavaFile _dartiumExecutable; | 205 JavaFile _dartiumExecutable; |
| 211 | 206 |
| 212 /** | 207 /** |
| 213 * The file containing the pub executable. | 208 * The file containing the pub executable. |
| 214 */ | 209 */ |
| 215 JavaFile _pubExecutable; | 210 JavaFile _pubExecutable; |
| 216 | 211 |
| 217 /** | 212 /** |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 String get sdkVersion { | 342 String get sdkVersion { |
| 348 if (_sdkVersion == null) { | 343 if (_sdkVersion == null) { |
| 349 _sdkVersion = DartSdk.DEFAULT_VERSION; | 344 _sdkVersion = DartSdk.DEFAULT_VERSION; |
| 350 JavaFile revisionFile = | 345 JavaFile revisionFile = |
| 351 new JavaFile.relative(_sdkDirectory, _VERSION_FILE_NAME); | 346 new JavaFile.relative(_sdkDirectory, _VERSION_FILE_NAME); |
| 352 try { | 347 try { |
| 353 String revision = revisionFile.readAsStringSync(); | 348 String revision = revisionFile.readAsStringSync(); |
| 354 if (revision != null) { | 349 if (revision != null) { |
| 355 _sdkVersion = revision.trim(); | 350 _sdkVersion = revision.trim(); |
| 356 } | 351 } |
| 357 } on FileSystemException catch (exception) { | 352 } on FileSystemException { |
| 358 // Fall through to return the default. | 353 // Fall through to return the default. |
| 359 } | 354 } |
| 360 } | 355 } |
| 361 return _sdkVersion; | 356 return _sdkVersion; |
| 362 } | 357 } |
| 363 | 358 |
| 364 @override | 359 @override |
| 365 List<String> get uris => _libraryMap.uris; | 360 List<String> get uris => _libraryMap.uris; |
| 366 | 361 |
| 367 /** | 362 /** |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 if (library == null) { | 488 if (library == null) { |
| 494 return null; | 489 return null; |
| 495 } | 490 } |
| 496 try { | 491 try { |
| 497 JavaFile file = new JavaFile.relative(libraryDirectory, library.path); | 492 JavaFile file = new JavaFile.relative(libraryDirectory, library.path); |
| 498 if (!relativePath.isEmpty) { | 493 if (!relativePath.isEmpty) { |
| 499 file = file.getParentFile(); | 494 file = file.getParentFile(); |
| 500 file = new JavaFile.relative(file, relativePath); | 495 file = new JavaFile.relative(file, relativePath); |
| 501 } | 496 } |
| 502 return new FileBasedSource.con2(parseUriWithException(dartUri), file); | 497 return new FileBasedSource.con2(parseUriWithException(dartUri), file); |
| 503 } on URISyntaxException catch (exception) { | 498 } on URISyntaxException { |
| 504 return null; | 499 return null; |
| 505 } | 500 } |
| 506 } | 501 } |
| 507 | 502 |
| 508 /** | 503 /** |
| 509 * Return the given [file] if it exists and is executable, or `null` if it | 504 * Return the given [file] if it exists and is executable, or `null` if it |
| 510 * does not exist or is not executable. | 505 * does not exist or is not executable. |
| 511 */ | 506 */ |
| 512 JavaFile _verifyExecutable(JavaFile file) => | 507 JavaFile _verifyExecutable(JavaFile file) => |
| 513 file.isExecutable() ? file : null; | 508 file.isExecutable() ? file : null; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 SdkLibrariesReader_LibraryBuilder libraryBuilder = | 563 SdkLibrariesReader_LibraryBuilder libraryBuilder = |
| 569 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); | 564 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); |
| 570 // If any syntactic errors were found then don't try to visit the AST | 565 // If any syntactic errors were found then don't try to visit the AST |
| 571 // structure. | 566 // structure. |
| 572 if (!errorListener.errorReported) { | 567 if (!errorListener.errorReported) { |
| 573 unit.accept(libraryBuilder); | 568 unit.accept(libraryBuilder); |
| 574 } | 569 } |
| 575 return libraryBuilder.librariesMap; | 570 return libraryBuilder.librariesMap; |
| 576 } | 571 } |
| 577 } | 572 } |
| OLD | NEW |