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

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

Issue 2988343002: Initial support for an explicit plugin list (Closed)
Patch Set: Created 3 years, 4 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/context/context.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 0922817ad5adccd83a0501e8c5e1bdff278b8108..07ec8e2b2c60f1ca9d47f3d6d0998cace7bd33bd 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1189,6 +1189,12 @@ abstract class AnalysisOptions {
bool get enableConditionalDirectives;
/**
+ * Return a list of the names of the packages for which, if they define a
+ * plugin, the plugin should be enabled.
+ */
+ List<String> get enabledPluginNames;
+
+ /**
* Return `true` to enable generic methods (DEP 22).
*/
@deprecated
@@ -1380,6 +1386,9 @@ class AnalysisOptionsImpl implements AnalysisOptions {
bool enableAssertInitializer = false;
@override
+ List<String> enabledPluginNames = const <String>[];
+
+ @override
bool enableLazyAssignmentOperators = false;
@override
@@ -1484,6 +1493,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
AnalysisOptionsImpl.from(AnalysisOptions options) {
analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate;
dart2jsHint = options.dart2jsHint;
+ enabledPluginNames = options.enabledPluginNames;
enableAssertInitializer = options.enableAssertInitializer;
enableStrictCallChecks = options.enableStrictCallChecks;
enableLazyAssignmentOperators = options.enableLazyAssignmentOperators;
@@ -1639,6 +1649,12 @@ class AnalysisOptionsImpl implements AnalysisOptions {
buffer.addString(lintRule.lintCode.uniqueName);
}
+ // Append plugin names.
+ buffer.addInt(enabledPluginNames.length);
+ for (String enabledPluginName in enabledPluginNames) {
+ buffer.addString(enabledPluginName);
+ }
+
// Hash and convert to Uint32List.
List<int> bytes = buffer.toByteList();
_signature = new Uint8List.fromList(bytes).buffer.asUint32List();
@@ -1651,6 +1667,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
declarationCasts = true;
dart2jsHint = false;
disableCacheFlushing = false;
+ enabledPluginNames = const <String>[];
enableAssertInitializer = false;
enableLazyAssignmentOperators = false;
enableStrictCallChecks = false;
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698