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

Unified Diff: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java

Issue 12438007: Updates to the new analyzer to help make the try bot happy. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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: editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java
===================================================================
--- editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java (revision 19891)
+++ editor/tools/plugins/com.google.dart.command.analyze/src/com/google/dart/command/analyze/AnalyzerImpl.java (working copy)
@@ -52,9 +52,13 @@
}
private AnalyzerOptions options;
+ private DartSdk sdk;
public AnalyzerImpl(AnalyzerOptions options) {
this.options = options;
+
+ // This sdk is shared between multiple runs of the analyzer.
+ sdk = new DartSdk(options.getDartSdkPath());
}
/**
@@ -72,9 +76,6 @@
throw new IllegalArgumentException("sourceFile cannot be null");
}
- // TODO(devoncarew): can we share this SDK when running in batch mode?
- DartSdk sdk = new DartSdk(options.getDartSdkPath());
-
AnalysisContext context = AnalysisEngine.getInstance().createAnalysisContext();
SourceFactory sourceFactory;

Powered by Google App Engine
This is Rietveld 408576698