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 'java_core.dart'; | 10 import 'java_core.dart'; |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 * Read all of the configuration files to initialize the library maps. | 430 * Read all of the configuration files to initialize the library maps. |
431 * | 431 * |
432 * @param useDart2jsPaths `true` if the dart2js path should be used when it is
available | 432 * @param useDart2jsPaths `true` if the dart2js path should be used when it is
available |
433 * @return the initialized library map | 433 * @return the initialized library map |
434 */ | 434 */ |
435 LibraryMap initialLibraryMap(bool useDart2jsPaths) { | 435 LibraryMap initialLibraryMap(bool useDart2jsPaths) { |
436 JavaFile librariesFile = new JavaFile.relative(new JavaFile.relative(library
Directory, _INTERNAL_DIR), _LIBRARIES_FILE); | 436 JavaFile librariesFile = new JavaFile.relative(new JavaFile.relative(library
Directory, _INTERNAL_DIR), _LIBRARIES_FILE); |
437 try { | 437 try { |
438 String contents = librariesFile.readAsStringSync(); | 438 String contents = librariesFile.readAsStringSync(); |
439 return new SdkLibrariesReader(useDart2jsPaths).readFromFile(librariesFile,
contents); | 439 return new SdkLibrariesReader(useDart2jsPaths).readFromFile(librariesFile,
contents); |
440 } on JavaException catch (exception) { | 440 } catch (exception) { |
441 AnalysisEngine.instance.logger.logError2("Could not initialize the library
map from ${librariesFile.getAbsolutePath()}", exception); | 441 AnalysisEngine.instance.logger.logError2("Could not initialize the library
map from ${librariesFile.getAbsolutePath()}", exception); |
442 return new LibraryMap(); | 442 return new LibraryMap(); |
443 } | 443 } |
444 } | 444 } |
445 | 445 |
446 /** | 446 /** |
447 * Ensure that the dart VM is executable. If it is not, make it executable and
log that it was | 447 * Ensure that the dart VM is executable. If it is not, make it executable and
log that it was |
448 * necessary for us to do so. | 448 * necessary for us to do so. |
449 */ | 449 */ |
450 void _ensureVmIsExecutable() { | 450 void _ensureVmIsExecutable() { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 Parser parser = new Parser(source, errorListener); | 546 Parser parser = new Parser(source, errorListener); |
547 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); | 547 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); |
548 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(_useDart2jsPaths); | 548 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(_useDart2jsPaths); |
549 // If any syntactic errors were found then don't try to visit the AST struct
ure. | 549 // If any syntactic errors were found then don't try to visit the AST struct
ure. |
550 if (!errorListener.errorReported) { | 550 if (!errorListener.errorReported) { |
551 unit.accept(libraryBuilder); | 551 unit.accept(libraryBuilder); |
552 } | 552 } |
553 return libraryBuilder.librariesMap; | 553 return libraryBuilder.librariesMap; |
554 } | 554 } |
555 } | 555 } |
OLD | NEW |