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

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

Issue 882813007: Make source be a target (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
Index: pkg/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index b3c117831733a3801846e986a313da33a83d5f47..63defa2e93509edc12703198f5f473a4bf195d2b 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -12,6 +12,7 @@ import 'dart:collection';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/package_map_resolver.dart';
+import 'package:analyzer/task/model.dart';
import 'engine.dart';
import 'java_core.dart';
@@ -24,6 +25,14 @@ import 'sdk.dart' show DartSdk;
typedef void ContentCacheVisitor(Source source, int stamp, String contents);
/**
+ * An abstract base class for implementations of [Source].
+ */
+abstract class AbstractSource implements Source {
Paul Berry 2015/01/29 18:37:55 I'm confused as to why this class is needed, since
Brian Wilkerson 2015/01/30 16:39:18 I think my intention would have been a lot more cl
+ @override
+ Source get source => this;
+}
+
+/**
* Instances of class `ContentCache` hold content used to override the default content of a
* [Source].
*/
@@ -309,7 +318,7 @@ class LocalSourcePredicate_TRUE implements LocalSourcePredicate {
/**
* An implementation of an non-existing [Source].
*/
-class NonExistingSource implements Source {
+class NonExistingSource extends AbstractSource {
final String _name;
final UriKind uriKind;
@@ -382,7 +391,7 @@ class NonExistingSource implements Source {
* retained so that if those files are created at a later date the long-lived sources representing
* those files will know that they now exist.
*/
-abstract class Source {
+abstract class Source implements AnalysisTarget {
/**
* An empty list of sources.
*/

Powered by Google App Engine
This is Rietveld 408576698