| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 Source fromEncoding(UriKind kind, Uri uri) => new FileBasedSource.con2(new Jav
aFile.fromUri(uri), kind); | 199 Source fromEncoding(UriKind kind, Uri uri) => new FileBasedSource.con2(new Jav
aFile.fromUri(uri), kind); |
| 200 | 200 |
| 201 AnalysisContext get context => _analysisContext; | 201 AnalysisContext get context => _analysisContext; |
| 202 | 202 |
| 203 /** | 203 /** |
| 204 * Return the file containing the Dartium executable, or `null` if it does not
exist. | 204 * Return the file containing the Dartium executable, or `null` if it does not
exist. |
| 205 * | 205 * |
| 206 * @return the file containing the Dartium executable | 206 * @return the file containing the Dartium executable |
| 207 */ | 207 */ |
| 208 JavaFile get dartiumExecutable { | 208 JavaFile get dartiumExecutable { |
| 209 { | 209 if (_dartiumExecutable == null) { |
| 210 if (_dartiumExecutable == null) { | 210 JavaFile file = new JavaFile.relative(dartiumWorkingDirectory, dartiumBina
ryName); |
| 211 JavaFile file = new JavaFile.relative(dartiumWorkingDirectory, dartiumBi
naryName); | 211 if (file.exists()) { |
| 212 if (file.exists()) { | 212 _dartiumExecutable = file; |
| 213 _dartiumExecutable = file; | |
| 214 } | |
| 215 } | 213 } |
| 216 } | 214 } |
| 217 return _dartiumExecutable; | 215 return _dartiumExecutable; |
| 218 } | 216 } |
| 219 | 217 |
| 220 /** | 218 /** |
| 221 * Return the directory where dartium can be found in the Dart SDK (the direct
ory that will be the | 219 * Return the directory where dartium can be found in the Dart SDK (the direct
ory that will be the |
| 222 * working directory is Dartium is invoked without changing the default). | 220 * working directory is Dartium is invoked without changing the default). |
| 223 * | 221 * |
| 224 * @return the directory where dartium can be found | 222 * @return the directory where dartium can be found |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 280 |
| 283 SdkLibrary getSdkLibrary(String dartUri) => _libraryMap.getLibrary(dartUri); | 281 SdkLibrary getSdkLibrary(String dartUri) => _libraryMap.getLibrary(dartUri); |
| 284 | 282 |
| 285 /** | 283 /** |
| 286 * Return the revision number of this SDK, or `"0"` if the revision number can
not be | 284 * Return the revision number of this SDK, or `"0"` if the revision number can
not be |
| 287 * discovered. | 285 * discovered. |
| 288 * | 286 * |
| 289 * @return the revision number of this SDK | 287 * @return the revision number of this SDK |
| 290 */ | 288 */ |
| 291 String get sdkVersion { | 289 String get sdkVersion { |
| 292 { | 290 if (_sdkVersion == null) { |
| 293 if (_sdkVersion == null) { | 291 _sdkVersion = DartSdk.DEFAULT_VERSION; |
| 294 _sdkVersion = DartSdk.DEFAULT_VERSION; | 292 JavaFile revisionFile = new JavaFile.relative(_sdkDirectory, _REVISION_FIL
E_NAME); |
| 295 JavaFile revisionFile = new JavaFile.relative(_sdkDirectory, _REVISION_F
ILE_NAME); | 293 try { |
| 296 try { | 294 String revision = revisionFile.readAsStringSync(); |
| 297 String revision = revisionFile.readAsStringSync(); | 295 if (revision != null) { |
| 298 if (revision != null) { | 296 _sdkVersion = revision; |
| 299 _sdkVersion = revision; | |
| 300 } | |
| 301 } on JavaIOException catch (exception) { | |
| 302 } | 297 } |
| 298 } on JavaIOException catch (exception) { |
| 303 } | 299 } |
| 304 } | 300 } |
| 305 return _sdkVersion; | 301 return _sdkVersion; |
| 306 } | 302 } |
| 307 | 303 |
| 308 /** | 304 /** |
| 309 * Return an array containing the library URI's for the libraries defined in t
his SDK. | 305 * Return an array containing the library URI's for the libraries defined in t
his SDK. |
| 310 * | 306 * |
| 311 * @return the library URI's for the libraries defined in this SDK | 307 * @return the library URI's for the libraries defined in this SDK |
| 312 */ | 308 */ |
| 313 List<String> get uris => _libraryMap.uris; | 309 List<String> get uris => _libraryMap.uris; |
| 314 | 310 |
| 315 /** | 311 /** |
| 316 * Return the file containing the VM executable, or `null` if it does not exis
t. | 312 * Return the file containing the VM executable, or `null` if it does not exis
t. |
| 317 * | 313 * |
| 318 * @return the file containing the VM executable | 314 * @return the file containing the VM executable |
| 319 */ | 315 */ |
| 320 JavaFile get vmExecutable { | 316 JavaFile get vmExecutable { |
| 321 { | 317 if (_vmExecutable == null) { |
| 322 if (_vmExecutable == null) { | 318 JavaFile file = new JavaFile.relative(new JavaFile.relative(_sdkDirectory,
_BIN_DIRECTORY_NAME), vmBinaryName); |
| 323 JavaFile file = new JavaFile.relative(new JavaFile.relative(_sdkDirector
y, _BIN_DIRECTORY_NAME), vmBinaryName); | 319 if (file.exists()) { |
| 324 if (file.exists()) { | 320 _vmExecutable = file; |
| 325 _vmExecutable = file; | |
| 326 } | |
| 327 } | 321 } |
| 328 } | 322 } |
| 329 return _vmExecutable; | 323 return _vmExecutable; |
| 330 } | 324 } |
| 331 | 325 |
| 332 /** | 326 /** |
| 333 * Return `true` if this SDK includes documentation. | 327 * Return `true` if this SDK includes documentation. |
| 334 * | 328 * |
| 335 * @return `true` if this installation of the SDK has documentation | 329 * @return `true` if this installation of the SDK has documentation |
| 336 */ | 330 */ |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 Parser parser = new Parser(source, errorListener); | 467 Parser parser = new Parser(source, errorListener); |
| 474 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); | 468 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); |
| 475 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(_useDart2jsPaths); | 469 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li
braryBuilder(_useDart2jsPaths); |
| 476 // If any syntactic errors were found then don't try to visit the AST struct
ure. | 470 // If any syntactic errors were found then don't try to visit the AST struct
ure. |
| 477 if (!errorListener.errorReported) { | 471 if (!errorListener.errorReported) { |
| 478 unit.accept(libraryBuilder); | 472 unit.accept(libraryBuilder); |
| 479 } | 473 } |
| 480 return libraryBuilder.librariesMap; | 474 return libraryBuilder.librariesMap; |
| 481 } | 475 } |
| 482 } | 476 } |
| OLD | NEW |