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

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: Remove AbstractSource 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
« no previous file with comments | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2a06746b459a078d21db0bfb5e46958279563283 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';
@@ -309,7 +310,7 @@ class LocalSourcePredicate_TRUE implements LocalSourcePredicate {
/**
* An implementation of an non-existing [Source].
*/
-class NonExistingSource implements Source {
+class NonExistingSource extends Source {
final String _name;
final UriKind uriKind;
@@ -382,7 +383,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.
*/
@@ -409,6 +410,9 @@ abstract class Source {
*/
String get encoding;
+ @override
+ Source get source => this;
+
/**
* Return the full (long) version of the name that can be displayed to the user to denote this
* source. For example, for a source representing a file this would typically be the absolute path
« no previous file with comments | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698