Index: pkg/analyzer_experimental/lib/src/analyzer_impl.dart |
diff --git a/pkg/analyzer_experimental/lib/src/analyzer_impl.dart b/pkg/analyzer_experimental/lib/src/analyzer_impl.dart |
index 84cfb8dc34358ccf1bcb0337924237e0366f8f43..4e46d616ba3a5f2e084884816446b771b23ad8ba 100644 |
--- a/pkg/analyzer_experimental/lib/src/analyzer_impl.dart |
+++ b/pkg/analyzer_experimental/lib/src/analyzer_impl.dart |
@@ -17,10 +17,12 @@ import 'generated/ast.dart'; |
import 'generated/element.dart'; |
import '../options.dart'; |
+ |
+DartSdk sdk; |
+ |
/// Analyzes single library [File]. |
class AnalyzerImpl { |
final CommandLineOptions options; |
- DartSdk sdk; |
ContentCache contentCache = new ContentCache(); |
SourceFactory sourceFactory; |
@@ -33,7 +35,9 @@ class AnalyzerImpl { |
final List<AnalysisErrorInfo> errorInfos = new List<AnalysisErrorInfo>(); |
AnalyzerImpl(CommandLineOptions this.options) { |
- sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); |
+ if (sdk == null) { |
+ sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath)); |
+ } |
} |
/** |