Index: pkg/analyzer/lib/src/generated/sdk.dart |
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart |
index 16bc5e85d125ff8b6fc6f281eb6295777683c1ff..e46b64438093fa0faa8e2dd48a7ad3c856554a45 100644 |
--- a/pkg/analyzer/lib/src/generated/sdk.dart |
+++ b/pkg/analyzer/lib/src/generated/sdk.dart |
@@ -9,7 +9,7 @@ import 'dart:collection'; |
import 'package:analyzer/dart/ast/ast.dart'; |
import 'package:analyzer/dart/ast/visitor.dart'; |
import 'package:analyzer/src/generated/engine.dart' |
- show AnalysisContext, AnalysisOptions; |
+ show AnalysisContext, AnalysisOptions, AnalysisOptionsImpl; |
import 'package:analyzer/src/generated/source.dart' show Source; |
import 'package:analyzer/src/generated/utilities_general.dart'; |
@@ -136,6 +136,12 @@ class DartSdkManager { |
} |
/** |
+ * Return a list of the descriptors of the SDKs that are currently being |
+ * managed. |
+ */ |
+ List<SdkDescription> get sdkDescriptors => sdkMap.keys.toList(); |
+ |
+ /** |
* Return the Dart SDK that is appropriate for the given analysis [options]. |
* If such an SDK has not yet been created, then the [sdkCreator] will be |
* invoked to create it. |
@@ -247,6 +253,30 @@ class SdkDescription { |
} |
return false; |
} |
+ |
+ @override |
+ String toString() { |
+ StringBuffer buffer = new StringBuffer(); |
+ bool needsSeparator = false; |
+ void add(String optionName) { |
+ if (needsSeparator) { |
+ buffer.write(', '); |
+ } |
+ buffer.write(optionName); |
+ needsSeparator = true; |
+ } |
+ for (String path in paths) { |
+ add(path); |
+ } |
+ if (needsSeparator) { |
+ buffer.write(' '); |
+ } |
+ buffer.write('('); |
+ buffer.write(AnalysisOptionsImpl |
+ .decodeCrossContextOptions(options.encodeCrossContextOptions())); |
+ buffer.write(')'); |
+ return buffer.toString(); |
+ } |
} |
class SdkLibrariesReader_LibraryBuilder extends RecursiveAstVisitor<Object> { |