OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analyzer.src.generated.engine; | 5 library analyzer.src.generated.engine; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
10 | 10 |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 @deprecated | 1182 @deprecated |
1183 bool get enableAsync; | 1183 bool get enableAsync; |
1184 | 1184 |
1185 /** | 1185 /** |
1186 * Return `true` to enable interface libraries (DEP 40). | 1186 * Return `true` to enable interface libraries (DEP 40). |
1187 */ | 1187 */ |
1188 @deprecated | 1188 @deprecated |
1189 bool get enableConditionalDirectives; | 1189 bool get enableConditionalDirectives; |
1190 | 1190 |
1191 /** | 1191 /** |
| 1192 * Return a list of the names of the packages for which, if they define a |
| 1193 * plugin, the plugin should be enabled. |
| 1194 */ |
| 1195 List<String> get enabledPluginNames; |
| 1196 |
| 1197 /** |
1192 * Return `true` to enable generic methods (DEP 22). | 1198 * Return `true` to enable generic methods (DEP 22). |
1193 */ | 1199 */ |
1194 @deprecated | 1200 @deprecated |
1195 bool get enableGenericMethods => null; | 1201 bool get enableGenericMethods => null; |
1196 | 1202 |
1197 /** | 1203 /** |
1198 * Return `true` if access to field formal parameters should be allowed in a | 1204 * Return `true` if access to field formal parameters should be allowed in a |
1199 * constructor's initializer list. | 1205 * constructor's initializer list. |
1200 */ | 1206 */ |
1201 @deprecated | 1207 @deprecated |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 @deprecated | 1379 @deprecated |
1374 int cacheSize = 64; | 1380 int cacheSize = 64; |
1375 | 1381 |
1376 @override | 1382 @override |
1377 bool dart2jsHint = false; | 1383 bool dart2jsHint = false; |
1378 | 1384 |
1379 @override | 1385 @override |
1380 bool enableAssertInitializer = false; | 1386 bool enableAssertInitializer = false; |
1381 | 1387 |
1382 @override | 1388 @override |
| 1389 List<String> enabledPluginNames = const <String>[]; |
| 1390 |
| 1391 @override |
1383 bool enableLazyAssignmentOperators = false; | 1392 bool enableLazyAssignmentOperators = false; |
1384 | 1393 |
1385 @override | 1394 @override |
1386 bool enableStrictCallChecks = false; | 1395 bool enableStrictCallChecks = false; |
1387 | 1396 |
1388 @override | 1397 @override |
1389 bool enableSuperMixins = false; | 1398 bool enableSuperMixins = false; |
1390 | 1399 |
1391 @override | 1400 @override |
1392 bool enableTiming = false; | 1401 bool enableTiming = false; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1477 */ | 1486 */ |
1478 AnalysisOptionsImpl(); | 1487 AnalysisOptionsImpl(); |
1479 | 1488 |
1480 /** | 1489 /** |
1481 * Initialize a newly created set of analysis options to have the same values | 1490 * Initialize a newly created set of analysis options to have the same values |
1482 * as those in the given set of analysis [options]. | 1491 * as those in the given set of analysis [options]. |
1483 */ | 1492 */ |
1484 AnalysisOptionsImpl.from(AnalysisOptions options) { | 1493 AnalysisOptionsImpl.from(AnalysisOptions options) { |
1485 analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate; | 1494 analyzeFunctionBodiesPredicate = options.analyzeFunctionBodiesPredicate; |
1486 dart2jsHint = options.dart2jsHint; | 1495 dart2jsHint = options.dart2jsHint; |
| 1496 enabledPluginNames = options.enabledPluginNames; |
1487 enableAssertInitializer = options.enableAssertInitializer; | 1497 enableAssertInitializer = options.enableAssertInitializer; |
1488 enableStrictCallChecks = options.enableStrictCallChecks; | 1498 enableStrictCallChecks = options.enableStrictCallChecks; |
1489 enableLazyAssignmentOperators = options.enableLazyAssignmentOperators; | 1499 enableLazyAssignmentOperators = options.enableLazyAssignmentOperators; |
1490 enableSuperMixins = options.enableSuperMixins; | 1500 enableSuperMixins = options.enableSuperMixins; |
1491 enableTiming = options.enableTiming; | 1501 enableTiming = options.enableTiming; |
1492 errorProcessors = options.errorProcessors; | 1502 errorProcessors = options.errorProcessors; |
1493 excludePatterns = options.excludePatterns; | 1503 excludePatterns = options.excludePatterns; |
1494 generateImplicitErrors = options.generateImplicitErrors; | 1504 generateImplicitErrors = options.generateImplicitErrors; |
1495 generateSdkErrors = options.generateSdkErrors; | 1505 generateSdkErrors = options.generateSdkErrors; |
1496 hint = options.hint; | 1506 hint = options.hint; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 for (ErrorProcessor processor in errorProcessors) { | 1642 for (ErrorProcessor processor in errorProcessors) { |
1633 buffer.addString(processor.description); | 1643 buffer.addString(processor.description); |
1634 } | 1644 } |
1635 | 1645 |
1636 // Append lints. | 1646 // Append lints. |
1637 buffer.addInt(lintRules.length); | 1647 buffer.addInt(lintRules.length); |
1638 for (Linter lintRule in lintRules) { | 1648 for (Linter lintRule in lintRules) { |
1639 buffer.addString(lintRule.lintCode.uniqueName); | 1649 buffer.addString(lintRule.lintCode.uniqueName); |
1640 } | 1650 } |
1641 | 1651 |
| 1652 // Append plugin names. |
| 1653 buffer.addInt(enabledPluginNames.length); |
| 1654 for (String enabledPluginName in enabledPluginNames) { |
| 1655 buffer.addString(enabledPluginName); |
| 1656 } |
| 1657 |
1642 // Hash and convert to Uint32List. | 1658 // Hash and convert to Uint32List. |
1643 List<int> bytes = buffer.toByteList(); | 1659 List<int> bytes = buffer.toByteList(); |
1644 _signature = new Uint8List.fromList(bytes).buffer.asUint32List(); | 1660 _signature = new Uint8List.fromList(bytes).buffer.asUint32List(); |
1645 } | 1661 } |
1646 return _signature; | 1662 return _signature; |
1647 } | 1663 } |
1648 | 1664 |
1649 @override | 1665 @override |
1650 void resetToDefaults() { | 1666 void resetToDefaults() { |
1651 declarationCasts = true; | 1667 declarationCasts = true; |
1652 dart2jsHint = false; | 1668 dart2jsHint = false; |
1653 disableCacheFlushing = false; | 1669 disableCacheFlushing = false; |
| 1670 enabledPluginNames = const <String>[]; |
1654 enableAssertInitializer = false; | 1671 enableAssertInitializer = false; |
1655 enableLazyAssignmentOperators = false; | 1672 enableLazyAssignmentOperators = false; |
1656 enableStrictCallChecks = false; | 1673 enableStrictCallChecks = false; |
1657 enableSuperMixins = false; | 1674 enableSuperMixins = false; |
1658 enableTiming = false; | 1675 enableTiming = false; |
1659 enableUriInPartOf = true; | 1676 enableUriInPartOf = true; |
1660 _errorProcessors = null; | 1677 _errorProcessors = null; |
1661 _excludePatterns = null; | 1678 _excludePatterns = null; |
1662 generateImplicitErrors = true; | 1679 generateImplicitErrors = true; |
1663 generateSdkErrors = false; | 1680 generateSdkErrors = false; |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2855 */ | 2872 */ |
2856 bool get wereSourcesAdded => _changeSet.addedSources.length > 0; | 2873 bool get wereSourcesAdded => _changeSet.addedSources.length > 0; |
2857 | 2874 |
2858 /** | 2875 /** |
2859 * Return `true` if any sources were removed or deleted. | 2876 * Return `true` if any sources were removed or deleted. |
2860 */ | 2877 */ |
2861 bool get wereSourcesRemoved => | 2878 bool get wereSourcesRemoved => |
2862 _changeSet.removedSources.length > 0 || | 2879 _changeSet.removedSources.length > 0 || |
2863 _changeSet.removedContainers.length > 0; | 2880 _changeSet.removedContainers.length > 0; |
2864 } | 2881 } |
OLD | NEW |