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

Side by Side Diff: pkg/analyzer/lib/src/generated/source_io.dart

Issue 708263002: Clean up references in comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.source.io; 8 library engine.source.io;
9 9
10 import 'source.dart'; 10 import 'source.dart';
(...skipping 24 matching lines...) Expand all
35 return "$path${JavaFile.separator}"; 35 return "$path${JavaFile.separator}";
36 } 36 }
37 37
38 /** 38 /**
39 * The container's path (not `null`). 39 * The container's path (not `null`).
40 */ 40 */
41 String _path; 41 String _path;
42 42
43 /** 43 /**
44 * Construct a container representing the specified directory and containing a ny sources whose 44 * Construct a container representing the specified directory and containing a ny sources whose
45 * [Source#getFullName] starts with the directory's path. This is a convenienc e method, 45 * [Source.fullName] starts with the directory's path. This is a convenience m ethod,
46 * fully equivalent to [DirectoryBasedSourceContainer#DirectoryBasedSourceCont ainer] 46 * fully equivalent to [DirectoryBasedSourceContainer.con2].
47 * .
48 * 47 *
49 * @param directory the directory (not `null`) 48 * @param directory the directory (not `null`)
50 */ 49 */
51 DirectoryBasedSourceContainer.con1(JavaFile directory) : this.con2(directory.g etPath()); 50 DirectoryBasedSourceContainer.con1(JavaFile directory) : this.con2(directory.g etPath());
52 51
53 /** 52 /**
54 * Construct a container representing the specified path and containing any so urces whose 53 * Construct a container representing the specified path and containing any so urces whose
55 * [Source#getFullName] starts with the specified path. 54 * [Source.fullName] starts with the specified path.
56 * 55 *
57 * @param path the path (not `null` and not empty) 56 * @param path the path (not `null` and not empty)
58 */ 57 */
59 DirectoryBasedSourceContainer.con2(String path) { 58 DirectoryBasedSourceContainer.con2(String path) {
60 this._path = _appendFileSeparator(path); 59 this._path = _appendFileSeparator(path);
61 } 60 }
62 61
63 @override 62 @override
64 bool contains(Source source) => source.fullName.startsWith(_path); 63 bool contains(Source source) => source.fullName.startsWith(_path);
65 64
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 String toString() { 192 String toString() {
194 if (file == null) { 193 if (file == null) {
195 return "<unknown source>"; 194 return "<unknown source>";
196 } 195 }
197 return file.getAbsolutePath(); 196 return file.getAbsolutePath();
198 } 197 }
199 198
200 /** 199 /**
201 * Get the contents and timestamp of the underlying file. 200 * Get the contents and timestamp of the underlying file.
202 * 201 *
203 * Clients should consider using the the method [AnalysisContext#getContents] 202 * Clients should consider using the the method [AnalysisContext.getContents]
204 * because contexts can have local overrides of the content of a source that t he source is not 203 * because contexts can have local overrides of the content of a source that t he source is not
205 * aware of. 204 * aware of.
206 * 205 *
207 * @return the contents of the source paired with the modification stamp of th e source 206 * @return the contents of the source paired with the modification stamp of th e source
208 * @throws Exception if the contents of this source could not be accessed 207 * @throws Exception if the contents of this source could not be accessed
209 * @see #getContents() 208 * See [contents].
210 */ 209 */
211 TimestampedData<String> get contentsFromFile { 210 TimestampedData<String> get contentsFromFile {
212 return new TimestampedData<String>(file.lastModified(), file.readAsStringSyn c()); 211 return new TimestampedData<String>(file.lastModified(), file.readAsStringSyn c());
213 } 212 }
214 213
215 /** 214 /**
216 * Record the time the IO took if it was slow 215 * Record the time the IO took if it was slow
217 */ 216 */
218 void _reportIfSlowIO(int nanos) { 217 void _reportIfSlowIO(int nanos) {
219 //If slower than 10ms 218 //If slower than 10ms
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 for (JavaFile dir in _relativeDirectories) { 502 for (JavaFile dir in _relativeDirectories) {
504 JavaFile file = new JavaFile.relative(dir, filePath); 503 JavaFile file = new JavaFile.relative(dir, filePath);
505 if (file.exists()) { 504 if (file.exists()) {
506 return new FileBasedSource.con2(uri, file); 505 return new FileBasedSource.con2(uri, file);
507 } 506 }
508 } 507 }
509 } 508 }
510 return null; 509 return null;
511 } 510 }
512 } 511 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698