| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 return _VM_EXECUTABLE_NAME_WIN; | 377 return _VM_EXECUTABLE_NAME_WIN; |
| 378 } else { | 378 } else { |
| 379 return _VM_EXECUTABLE_NAME; | 379 return _VM_EXECUTABLE_NAME; |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 | 382 |
| 383 /** | 383 /** |
| 384 * Read all of the configuration files to initialize the library maps. | 384 * Read all of the configuration files to initialize the library maps. |
| 385 */ | 385 */ |
| 386 void initializeLibraryMap() { | 386 void initializeLibraryMap() { |
| 387 JavaFile librariesFile = new JavaFile.relative(new JavaFile.relative(library
Directory, _INTERNAL_DIR), _LIBRARIES_FILE); |
| 387 try { | 388 try { |
| 388 JavaFile librariesFile = new JavaFile.relative(new JavaFile.relative(libra
ryDirectory, _INTERNAL_DIR), _LIBRARIES_FILE); | |
| 389 String contents = librariesFile.readAsStringSync(); | 389 String contents = librariesFile.readAsStringSync(); |
| 390 _libraryMap = new SdkLibrariesReader().readFrom(librariesFile, contents); | 390 _libraryMap = new SdkLibrariesReader().readFrom(librariesFile, contents); |
| 391 } on JavaException catch (exception) { | 391 } on JavaException catch (exception) { |
| 392 AnalysisEngine.instance.logger.logError3(exception); | 392 AnalysisEngine.instance.logger.logError2("Could not initialize the library
map from ${librariesFile.getAbsolutePath()}", exception); |
| 393 _libraryMap = new LibraryMap(); | 393 _libraryMap = new LibraryMap(); |
| 394 } | 394 } |
| 395 } | 395 } |
| 396 | 396 |
| 397 /** | 397 /** |
| 398 * Initialize the state of the SDK. | 398 * Initialize the state of the SDK. |
| 399 */ | 399 */ |
| 400 void initializeSdk() { | 400 void initializeSdk() { |
| 401 if (!OSUtilities.isWindows()) { | 401 if (!OSUtilities.isWindows()) { |
| 402 ensureVmIsExecutable(); | 402 ensureVmIsExecutable(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 Parser parser = new Parser(source, errorListener); | 452 Parser parser = new Parser(source, errorListener); |
| 453 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); | 453 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); |
| 454 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(); | 454 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(); |
| 455 // If any syntactic errors were found then don't try to visit the AST struct
ure. | 455 // If any syntactic errors were found then don't try to visit the AST struct
ure. |
| 456 if (!errorListener.errorReported) { | 456 if (!errorListener.errorReported) { |
| 457 unit.accept(libraryBuilder); | 457 unit.accept(libraryBuilder); |
| 458 } | 458 } |
| 459 return libraryBuilder.librariesMap; | 459 return libraryBuilder.librariesMap; |
| 460 } | 460 } |
| 461 } | 461 } |
| OLD | NEW |