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

Side by Side Diff: pkg/analyzer/lib/file_system/memory_file_system.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, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 memory_file_system; 5 library memory_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/generated/engine.dart' show TimestampedData; 10 import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 @override 205 @override
206 bool isOrContains(String path) { 206 bool isOrContains(String path) {
207 return path == this.path; 207 return path == this.path;
208 } 208 }
209 } 209 }
210 210
211 211
212 /** 212 /**
213 * An in-memory implementation of [Source]. 213 * An in-memory implementation of [Source].
214 */ 214 */
215 class _MemoryFileSource implements Source { 215 class _MemoryFileSource extends Source {
216 final _MemoryFile _file; 216 final _MemoryFile _file;
217 217
218 final Uri uri; 218 final Uri uri;
219 219
220 _MemoryFileSource(this._file, this.uri); 220 _MemoryFileSource(this._file, this.uri);
221 221
222 @override 222 @override
223 TimestampedData<String> get contents { 223 TimestampedData<String> get contents {
224 return new TimestampedData<String>(modificationStamp, _file._content); 224 return new TimestampedData<String>(modificationStamp, _file._content);
225 } 225 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 bool operator ==(other) { 376 bool operator ==(other) {
377 if (runtimeType != other.runtimeType) { 377 if (runtimeType != other.runtimeType) {
378 return false; 378 return false;
379 } 379 }
380 return path == other.path; 380 return path == other.path;
381 } 381 }
382 382
383 @override 383 @override
384 String toString() => path; 384 String toString() => path;
385 } 385 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698