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 22d9cc53e0232f02d0369e72650444e93795359e..cb74dcad3d26ce22c24a40bc8b4e9a3ad979d514 100644 |
--- a/pkg/analysis_server/lib/src/context_manager.dart |
+++ b/pkg/analysis_server/lib/src/context_manager.dart |
@@ -239,6 +239,12 @@ abstract class ContextManager { |
AnalysisContext getContextFor(String path); |
/** |
+ * Return `true` if the given [path] is ignored by a [ContextInfo] whose |
+ * folder contains it. |
+ */ |
+ bool isIgnored(String path); |
+ |
+ /** |
* Return `true` if the given absolute [path] is in one of the current |
* root folders and is not excluded. |
*/ |
@@ -472,6 +478,20 @@ class ContextManagerImpl implements ContextManager { |
} |
@override |
+ bool isIgnored(String path) { |
+ ContextInfo info = _rootInfo; |
+ do { |
+ info = info.findChildInfoFor(path); |
+ if (info == null) { |
+ return false; |
+ } |
+ if (info.ignored(path)) { |
+ return true; |
+ } |
+ } while (true); |
+ } |
+ |
+ @override |
bool isInAnalysisRoot(String path) { |
// check if excluded |
if (_isExcluded(path)) { |