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; |