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

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

Issue 1451893002: If analysis is already complete, don't start it again in onFileAnalysisComplete(). (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
« 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/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index e330d8fe00c05133ce422814e5db06ad7937ea08..088d2a60dfa4efc89a7580df43b82d6a9103d9e3 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -757,6 +757,10 @@ class AnalysisServer {
if (context == null) {
return null;
}
+ // done if everything is already analyzed
+ if (isAnalysisComplete()) {
+ return new Future.value(AnalysisDoneReason.COMPLETE);
+ }
// schedule context analysis
schedulePerformAnalysisOperation(context);
// associate with the context completer
« 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