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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 692073004: Issue 21506. Fix for adding back previously excluded resources in sub-folders. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 2447fcda8e358931c3bd1ecad8d90785a9a10077..6f815d17c52df1ccd4c92140769c14a7d0de09ce 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -239,20 +239,23 @@ abstract class ContextManager {
List<Resource> children = folder.getChildren();
for (Resource child in children) {
String path = child.path;
- // ignore if wasn't previously excluded
- bool wasExcluded =
- _isExcludedBy(oldExcludedPaths, path) &&
- !_isExcludedBy(excludedPaths, path);
- if (!wasExcluded) {
- continue;
- }
// add files, recurse into folders
if (child is File) {
- if (_shouldFileBeAnalyzed(child)) {
- Source source = child.createSource();
- changeSet.addedSource(source);
- info.sources[path] = source;
+ // ignore if should not be analyzed at all
+ if (!_shouldFileBeAnalyzed(child)) {
+ continue;
}
+ // ignore if was not excluded
+ bool wasExcluded =
+ _isExcludedBy(oldExcludedPaths, path) &&
+ !_isExcludedBy(excludedPaths, path);
+ if (!wasExcluded) {
+ continue;
+ }
+ // do add the file
+ Source source = child.createSource();
+ changeSet.addedSource(source);
+ info.sources[path] = source;
} else if (child is Folder) {
if (child.shortName == PACKAGES_NAME) {
continue;
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698