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

Unified Diff: pkg/analyzer/lib/src/generated/sdk.dart

Issue 2107313002: Make SDK contexts visible on status page (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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> {
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698