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

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

Issue 1462693002: Report error for ignored priority file. Ignore subscription for ignored files. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
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)) {

Powered by Google App Engine
This is Rietveld 408576698