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

Unified Diff: pkg/analysis_server/lib/src/plugin/plugin_manager.dart

Issue 3001133002: Handle watch events that arrive before plugin start-up (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/plugin/plugin_manager.dart
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
index 11b61997ce1b3e41b264889385044dcde171c1ef..9ceb4c32dab2cc499b33d0ad4b820e8f9d53f649 100644
--- a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
+++ b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
@@ -423,7 +423,12 @@ class PluginManager {
PluginSession session = plugin.currentSession;
if (session != null &&
plugin.isAnalyzing(filePath) &&
+ session.interestingFiles != null &&
session.interestingFiles.any(matches)) {
+ // The list of interesting file globs is `null` if the plugin has not
+ // yet responded to the plugin.versionCheck request. If that happens
+ // then the plugin hasn't had a chance to analyze anything yet, and
+ // hence it does not needed to get watch events.
event ??= _convertWatchEvent(watchEvent);
AnalysisHandleWatchEventsParams params =
new AnalysisHandleWatchEventsParams([event]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698