| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.source; | 4 library engine.source; |
| 5 | 5 |
| 6 import 'dart:uri'; | 6 import 'dart:uri'; |
| 7 import 'java_core.dart'; | 7 import 'java_core.dart'; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Instances of the class {@code SourceFactory} resolve possibly relative URI's
against an existing{@link Source source}. | 10 * Instances of the class {@code SourceFactory} resolve possibly relative URI's
against an existing{@link Source source}. |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 if (offset >= other.end) { | 358 if (offset >= other.end) { |
| 359 return false; | 359 return false; |
| 360 } | 360 } |
| 361 return true; | 361 return true; |
| 362 } | 362 } |
| 363 /** | 363 /** |
| 364 * @return <code>true</code> if this {@link SourceRange} starts in <code>other
Range</code>. | 364 * @return <code>true</code> if this {@link SourceRange} starts in <code>other
Range</code>. |
| 365 */ | 365 */ |
| 366 bool startsIn(SourceRange otherRange) => otherRange.contains(_offset); | 366 bool startsIn(SourceRange otherRange) => otherRange.contains(_offset); |
| 367 String toString() { | 367 String toString() { |
| 368 StringBuffer builder = new StringBuffer(); | 368 JavaStringBuilder builder = new JavaStringBuilder(); |
| 369 builder.write("[offset="); | 369 builder.append("[offset="); |
| 370 builder.write(_offset); | 370 builder.append(_offset); |
| 371 builder.write(", length="); | 371 builder.append(", length="); |
| 372 builder.write(_length); | 372 builder.append(_length); |
| 373 builder.write("]"); | 373 builder.append("]"); |
| 374 return builder.toString(); | 374 return builder.toString(); |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 /** | 377 /** |
| 378 * The interface {@code SourceContainer} is used by clients to define a collecti
on of sources | 378 * The interface {@code SourceContainer} is used by clients to define a collecti
on of sources |
| 379 * <p> | 379 * <p> |
| 380 * Source containers are not used within analysis engine, but can be used by cli
ents to group | 380 * Source containers are not used within analysis engine, but can be used by cli
ents to group |
| 381 * sources for the purposes of accessing composite dependency information. For e
xample, the Eclipse | 381 * sources for the purposes of accessing composite dependency information. For e
xample, the Eclipse |
| 382 * client uses source containers to represent Eclipse projects, which allows it
to easily compute | 382 * client uses source containers to represent Eclipse projects, which allows it
to easily compute |
| 383 * project-level dependencies. | 383 * project-level dependencies. |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 * @param contents the new contents of the source | 487 * @param contents the new contents of the source |
| 488 */ | 488 */ |
| 489 void setContents(Source source, String contents) { | 489 void setContents(Source source, String contents) { |
| 490 if (contents == null) { | 490 if (contents == null) { |
| 491 _contentMap.remove(source); | 491 _contentMap.remove(source); |
| 492 } else { | 492 } else { |
| 493 _contentMap[source] = contents; | 493 _contentMap[source] = contents; |
| 494 } | 494 } |
| 495 } | 495 } |
| 496 } | 496 } |
| OLD | NEW |