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

Unified Diff: pkg/analysis_server/test/context_manager_test.dart

Issue 1152013002: Add support for specifying files needing analysis (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/test/context_manager_test.dart
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 59df06f74073a4ac2c3b2c7ad3a1fcffba04bddb..95a97b8ac5cd296e566e7ee4b9d139b12dad0b8a 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -1019,6 +1019,20 @@ class TestContextManager extends ContextManager {
}
@override
+ bool shouldFileBeAnalyzed(File file) {
+ if (!(AnalysisEngine.isDartFileName(file.path) ||
+ AnalysisEngine.isHtmlFileName(file.path))) {
+ return false;
+ }
+ // Emacs creates dummy links to track the fact that a file is open for
+ // editing and has unsaved changes (e.g. having unsaved changes to
+ // 'foo.dart' causes a link '.#foo.dart' to be created, which points to the
+ // non-existent file 'username@hostname.pid'. To avoid these dummy links
+ // causing the analyzer to thrash, just ignore links to non-existent files.
+ return file.exists;
+ }
+
+ @override
void updateContextPackageUriResolver(
Folder contextFolder, UriResolver packageUriResolver) {
currentContextPackageUriResolvers[contextFolder.path] = packageUriResolver;
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698