| 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 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 | 9 |
| 10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 * Resursively adds all Dart and HTML files to the [changeSet]. | 278 * Resursively adds all Dart and HTML files to the [changeSet]. |
| 279 */ | 279 */ |
| 280 void _addPreviouslyExcludedSources(_ContextInfo info, ChangeSet changeSet, | 280 void _addPreviouslyExcludedSources(_ContextInfo info, ChangeSet changeSet, |
| 281 Folder folder, List<String> oldExcludedPaths) { | 281 Folder folder, List<String> oldExcludedPaths) { |
| 282 if (info.excludesResource(folder)) { | 282 if (info.excludesResource(folder)) { |
| 283 return; | 283 return; |
| 284 } | 284 } |
| 285 List<Resource> children; | 285 List<Resource> children; |
| 286 try { | 286 try { |
| 287 children = folder.getChildren(); | 287 children = folder.getChildren(); |
| 288 } on FileSystemException catch (exception) { | 288 } on FileSystemException { |
| 289 // The folder no longer exists, or cannot be read, to there's nothing to | 289 // The folder no longer exists, or cannot be read, to there's nothing to |
| 290 // do. | 290 // do. |
| 291 return; | 291 return; |
| 292 } | 292 } |
| 293 for (Resource child in children) { | 293 for (Resource child in children) { |
| 294 String path = child.path; | 294 String path = child.path; |
| 295 // add files, recurse into folders | 295 // add files, recurse into folders |
| 296 if (child is File) { | 296 if (child is File) { |
| 297 // ignore if should not be analyzed at all | 297 // ignore if should not be analyzed at all |
| 298 if (!_shouldFileBeAnalyzed(child)) { | 298 if (!_shouldFileBeAnalyzed(child)) { |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 return excludes(resource.path); | 753 return excludes(resource.path); |
| 754 } | 754 } |
| 755 | 755 |
| 756 /** | 756 /** |
| 757 * Returns `true` if [path] is the pubspec file of this context. | 757 * Returns `true` if [path] is the pubspec file of this context. |
| 758 */ | 758 */ |
| 759 bool isPubspec(String path) { | 759 bool isPubspec(String path) { |
| 760 return path == pubspecPath; | 760 return path == pubspecPath; |
| 761 } | 761 } |
| 762 } | 762 } |
| OLD | NEW |