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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 2183003003: Associate excludes with context data. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | pkg/analyzer/lib/src/context/context.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 585da4628b77350130670db2dd01b158c96cf6a5..e77ae2261d71a7eda0720fd3c6c3cf49cfbd9d61 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -23,6 +23,7 @@ import 'package:analyzer/source/path_filter.dart';
import 'package:analyzer/source/pub_package_map_provider.dart';
import 'package:analyzer/source/sdk_ext.dart';
import 'package:analyzer/src/context/context.dart' as context;
+import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/context/source.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/java_engine.dart';
@@ -625,7 +626,7 @@ class ContextManagerImpl implements ContextManager {
if (analyzer is Map) {
// Set ignore patterns.
YamlList exclude = analyzer[AnalyzerOptions.exclude];
- List<String> excludeList = _toStringList(exclude);
+ List<String> excludeList = toStringList(exclude);
if (excludeList != null) {
setIgnorePatternsForContext(info, excludeList);
}
@@ -1594,25 +1595,6 @@ class ContextManagerImpl implements ContextManager {
}
/**
- * If all of the elements of [list] are strings, return a list of strings
- * containing the same elements. Otherwise, return `null`.
- */
- List<String> _toStringList(YamlList list) {
- if (list == null) {
- return null;
- }
- List<String> stringList = <String>[];
- for (var element in list) {
- if (element is String) {
- stringList.add(element);
- } else {
- return null;
- }
- }
- return stringList;
- }
-
- /**
* If the given [object] is a map, and all of the keys in the map are strings,
* return a map containing the same mappings. Otherwise, return `null`.
*/
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | pkg/analyzer/lib/src/context/context.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698