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

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

Issue 2415413003: Remove unused method and field from DartSdkManager (Closed)
Patch Set: Created 4 years, 2 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/analysis_server/test/socket_server_test.dart ('k') | pkg/analyzer/test/generated/sdk_test.dart » ('j') | 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 a6284e1e03da0607fb8d6a4b6675e9d9e4417f63..c3e8e655eb6254c1ff689483fe5066fa510d8696 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -16,12 +16,6 @@ import 'package:analyzer/src/generated/utilities_general.dart';
import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
/**
- * A function used to create a new DartSdk with the given [options]. If the
- * passed [options] are `null`, then default options are used.
- */
-typedef DartSdk SdkCreator(AnalysisOptions options);
-
-/**
* A Dart SDK installed in a specified location.
*/
abstract class DartSdk {
@@ -118,11 +112,6 @@ class DartSdkManager {
final bool canUseSummaries;
/**
- * The function used to create new SDK's.
- */
- final SdkCreator sdkCreator;
-
- /**
* A table mapping (an encoding of) analysis options and SDK locations to the
* DartSdk from that location that has been configured with those options.
*/
@@ -131,8 +120,7 @@ class DartSdkManager {
/**
* Initialize a newly created manager.
*/
- DartSdkManager(
- this.defaultSdkDirectory, this.canUseSummaries, this.sdkCreator);
+ DartSdkManager(this.defaultSdkDirectory, this.canUseSummaries);
/**
* Return any SDK that has been created, or `null` if no SDKs have been
@@ -152,25 +140,13 @@ class DartSdkManager {
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.
+ * Return the Dart SDK that is appropriate for the given SDK [description].
+ * If such an SDK has not yet been created, then the [ifAbsent] function will
+ * be invoked to create it.
*/
DartSdk getSdk(SdkDescription description, DartSdk ifAbsent()) {
return sdkMap.putIfAbsent(description, ifAbsent);
}
-
- /**
- * 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.
- */
- DartSdk getSdkForOptions(AnalysisOptions options) {
- // TODO(brianwilkerson) Remove this method and the field sdkCreator.
- SdkDescription description =
- new SdkDescription(<String>[defaultSdkDirectory], options);
- return getSdk(description, () => sdkCreator(options));
- }
}
/**
« no previous file with comments | « pkg/analysis_server/test/socket_server_test.dart ('k') | pkg/analyzer/test/generated/sdk_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698