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

Unified Diff: pkg/analyzer/lib/source/path_filter.dart

Issue 1278823002: Fix PathFilter constructor to be backward compatible with analyzer 0.26.0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/analysis_server/lib/src/context_manager.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/source/path_filter.dart
diff --git a/pkg/analyzer/lib/source/path_filter.dart b/pkg/analyzer/lib/source/path_filter.dart
index f4123f883217b7e73312447498318c4fa2a9ebc2..40e81a63427386a08c82af332d72ce753678e0b9 100644
--- a/pkg/analyzer/lib/source/path_filter.dart
+++ b/pkg/analyzer/lib/source/path_filter.dart
@@ -5,13 +5,13 @@
library source.path_filter;
import 'package:glob/glob.dart' as glob;
-import 'package:path/path.dart';
+import 'package:path/path.dart' as path;
/// Filter paths against a set of [ignorePatterns] relative to a [root]
/// directory. Paths outside of [root] are also ignored.
class PathFilter {
/// The path context to use when manipulating paths.
- final Context pathContext;
+ final path.Context pathContext;
/// Path that all ignore patterns are relative to.
final String root;
@@ -20,7 +20,9 @@ class PathFilter {
final List<glob.Glob> _ignorePatterns = new List<glob.Glob>();
/// Construct a new path filter rooted at [root] with [ignorePatterns].
- PathFilter(this.pathContext, this.root, List<String> ignorePatterns) {
+ /// If [pathContext] is not specified, then the system path context is used.
+ PathFilter(this.root, List<String> ignorePatterns, [path.Context pathContext])
+ : this.pathContext = pathContext != null ? pathContext : path.context {
setIgnorePatterns(ignorePatterns);
}
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698