Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/sdk_io.dart

Issue 14050010: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 3
4 library engine.sdk; 4 library engine.sdk;
5 5
6 import 'dart:io'; 6 import 'dart:io';
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'java_core.dart'; 8 import 'java_core.dart';
9 import 'java_io.dart'; 9 import 'java_io.dart';
10 import 'java_engine.dart'; 10 import 'java_engine.dart';
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 initializeLibraryMap(); 157 initializeLibraryMap();
158 _analysisContext = new AnalysisContextImpl(); 158 _analysisContext = new AnalysisContextImpl();
159 _analysisContext.sourceFactory = new SourceFactory.con2([new DartUriResolver (this)]); 159 _analysisContext.sourceFactory = new SourceFactory.con2([new DartUriResolver (this)]);
160 List<String> uris2 = uris; 160 List<String> uris2 = uris;
161 ChangeSet changeSet = new ChangeSet(); 161 ChangeSet changeSet = new ChangeSet();
162 for (String uri in uris2) { 162 for (String uri in uris2) {
163 changeSet.added(_analysisContext.sourceFactory.forUri(uri)); 163 changeSet.added(_analysisContext.sourceFactory.forUri(uri));
164 } 164 }
165 _analysisContext.applyChanges(changeSet); 165 _analysisContext.applyChanges(changeSet);
166 } 166 }
167 Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri) => new F ileBasedSource.con2(contentCache, new JavaFile.fromUri(uri), kind);
167 AnalysisContext get context => _analysisContext; 168 AnalysisContext get context => _analysisContext;
168 /** 169 /**
169 * Return the file containing the Dartium executable, or {@code null} if it do es not exist. 170 * Return the file containing the Dartium executable, or {@code null} if it do es not exist.
170 * @return the file containing the Dartium executable 171 * @return the file containing the Dartium executable
171 */ 172 */
172 JavaFile get dartiumExecutable { 173 JavaFile get dartiumExecutable {
173 { 174 {
174 if (_dartiumExecutable == null) { 175 if (_dartiumExecutable == null) {
175 JavaFile file = new JavaFile.relative(dartiumWorkingDirectory, dartiumBi naryName); 176 JavaFile file = new JavaFile.relative(dartiumWorkingDirectory, dartiumBi naryName);
176 if (file.exists()) { 177 if (file.exists()) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 /** 271 /**
271 * Return {@code true} if the Dartium binary is available. 272 * Return {@code true} if the Dartium binary is available.
272 * @return {@code true} if the Dartium binary is available 273 * @return {@code true} if the Dartium binary is available
273 */ 274 */
274 bool isDartiumInstalled() => dartiumExecutable != null; 275 bool isDartiumInstalled() => dartiumExecutable != null;
275 Source mapDartUri(ContentCache contentCache, String dartUri) { 276 Source mapDartUri(ContentCache contentCache, String dartUri) {
276 SdkLibrary library = _libraryMap.getLibrary(dartUri); 277 SdkLibrary library = _libraryMap.getLibrary(dartUri);
277 if (library == null) { 278 if (library == null) {
278 return null; 279 return null;
279 } 280 }
280 return new FileBasedSource.con2(contentCache, new JavaFile.relative(libraryD irectory, library.path), true); 281 return new FileBasedSource.con2(contentCache, new JavaFile.relative(libraryD irectory, library.path), UriKind.DART_URI);
281 } 282 }
282 /** 283 /**
283 * Ensure that the dart VM is executable. If it is not, make it executable and log that it was 284 * Ensure that the dart VM is executable. If it is not, make it executable and log that it was
284 * necessary for us to do so. 285 * necessary for us to do so.
285 */ 286 */
286 void ensureVmIsExecutable() { 287 void ensureVmIsExecutable() {
287 } 288 }
288 /** 289 /**
289 * Return the name of the file containing the VM executable. 290 * Return the name of the file containing the VM executable.
290 * @return the name of the file containing the VM executable 291 * @return the name of the file containing the VM executable
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 * @coverage dart.engine.sdk 355 * @coverage dart.engine.sdk
355 */ 356 */
356 class SdkLibrariesReader { 357 class SdkLibrariesReader {
357 /** 358 /**
358 * Return the library map read from the given source. 359 * Return the library map read from the given source.
359 * @return the library map read from the given source 360 * @return the library map read from the given source
360 */ 361 */
361 LibraryMap readFrom(JavaFile librariesFile, String libraryFileContents) { 362 LibraryMap readFrom(JavaFile librariesFile, String libraryFileContents) {
362 List<bool> foundError = [false]; 363 List<bool> foundError = [false];
363 AnalysisErrorListener errorListener = new AnalysisErrorListener_10(foundErro r); 364 AnalysisErrorListener errorListener = new AnalysisErrorListener_10(foundErro r);
364 Source source = new FileBasedSource.con2(null, librariesFile, false); 365 Source source = new FileBasedSource.con2(null, librariesFile, UriKind.FILE_U RI);
365 StringScanner scanner = new StringScanner(source, libraryFileContents, error Listener); 366 StringScanner scanner = new StringScanner(source, libraryFileContents, error Listener);
366 Parser parser = new Parser(source, errorListener); 367 Parser parser = new Parser(source, errorListener);
367 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); 368 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize());
368 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li braryBuilder(); 369 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li braryBuilder();
369 if (!foundError[0]) { 370 if (!foundError[0]) {
370 unit.accept(libraryBuilder); 371 unit.accept(libraryBuilder);
371 } 372 }
372 return libraryBuilder.librariesMap; 373 return libraryBuilder.librariesMap;
373 } 374 }
374 } 375 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return null; 452 return null;
452 } 453 }
453 } 454 }
454 class AnalysisErrorListener_10 implements AnalysisErrorListener { 455 class AnalysisErrorListener_10 implements AnalysisErrorListener {
455 List<bool> foundError; 456 List<bool> foundError;
456 AnalysisErrorListener_10(this.foundError); 457 AnalysisErrorListener_10(this.foundError);
457 void onError(AnalysisError error) { 458 void onError(AnalysisError error) {
458 foundError[0] = true; 459 foundError[0] = true;
459 } 460 }
460 } 461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698