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

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

Issue 443213002: Send 'analysis.errors' notification only for files in analysis roots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/context_directory_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_directory_manager.dart b/pkg/analysis_server/lib/src/context_directory_manager.dart
index fa1970c813998f3fc6a939594f437e1baf8060d9..2fe5a118a859d97fce2e03a2a149096186e6c69c 100644
--- a/pkg/analysis_server/lib/src/context_directory_manager.dart
+++ b/pkg/analysis_server/lib/src/context_directory_manager.dart
@@ -241,6 +241,19 @@ abstract class ContextDirectoryManager {
}
/**
+ * Returns `true` if the given absolute [path] is in one of the current
+ * root folders and is not excluded.
+ */
+ bool isInAnalysisRoot(String path) {
Brian Wilkerson 2014/08/06 19:40:43 This doesn't look like it's taking care of exclude
scheglov 2014/08/06 19:58:04 Thanks, I was going to add TODO, but forgot. Done.
+ for (Folder root in _currentDirectoryInfo.keys) {
+ if (path.startsWith(root.path)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* Called when a new context needs to be created.
*/
void addContext(Folder folder, Map<String, List<Folder>> packageMap);
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698