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

Side by Side Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1316753003: Ignore non-existent analysis roots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library context.directory.manager; 5 library context.directory.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core' hide Resource; 10 import 'dart:core' hide Resource;
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 }); 524 });
525 525
526 List<ContextInfo> contextInfos = _rootInfo.descendants.toList(); 526 List<ContextInfo> contextInfos = _rootInfo.descendants.toList();
527 // included 527 // included
528 Set<Folder> includedFolders = new HashSet<Folder>(); 528 Set<Folder> includedFolders = new HashSet<Folder>();
529 for (int i = 0; i < includedPaths.length; i++) { 529 for (int i = 0; i < includedPaths.length; i++) {
530 String path = includedPaths[i]; 530 String path = includedPaths[i];
531 Resource resource = resourceProvider.getResource(path); 531 Resource resource = resourceProvider.getResource(path);
532 if (resource is Folder) { 532 if (resource is Folder) {
533 includedFolders.add(resource); 533 includedFolders.add(resource);
534 } else if (!resource.exists) {
535 // Non-existent resources are ignored. TODO(paulberry): we should set
536 // up a watcher to ensure that if the resource appears later, we will
537 // begin analyzing it.
534 } else { 538 } else {
535 // TODO(scheglov) implemented separate files analysis 539 // TODO(scheglov) implemented separate files analysis
536 throw new UnimplementedError('$path is not a folder. ' 540 throw new UnimplementedError('$path is not a folder. '
537 'Only support for folder analysis is implemented currently.'); 541 'Only support for folder analysis is implemented currently.');
538 } 542 }
539 } 543 }
540 this.includedPaths = includedPaths; 544 this.includedPaths = includedPaths;
541 // excluded 545 // excluded
542 List<String> oldExcludedPaths = this.excludedPaths; 546 List<String> oldExcludedPaths = this.excludedPaths;
543 this.excludedPaths = excludedPaths; 547 this.excludedPaths = excludedPaths;
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 var path = resourceProvider.pathContext.fromUri(uri); 1385 var path = resourceProvider.pathContext.fromUri(uri);
1382 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; 1386 packageMap[name] = <Folder>[resourceProvider.getFolder(path)];
1383 } 1387 }
1384 }); 1388 });
1385 return <UriResolver>[new SdkExtUriResolver(packageMap)]; 1389 return <UriResolver>[new SdkExtUriResolver(packageMap)];
1386 } else { 1390 } else {
1387 return const <UriResolver>[]; 1391 return const <UriResolver>[];
1388 } 1392 }
1389 } 1393 }
1390 } 1394 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698