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

Unified Diff: pkg/analyzer/lib/src/string_source.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/utilities_general.dart ('k') | pkg/analyzer/lib/src/task/task_dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/string_source.dart
diff --git a/pkg/analyzer/lib/src/string_source.dart b/pkg/analyzer/lib/src/string_source.dart
index bfeedf091452c6a80c2ff12517b31823d868bd97..789e74c7990d3cf9ba754a60e4d449144033987e 100644
--- a/pkg/analyzer/lib/src/string_source.dart
+++ b/pkg/analyzer/lib/src/string_source.dart
@@ -4,8 +4,8 @@
library analyzer.string_source;
-import 'generated/source.dart';
import 'generated/engine.dart' show TimestampedData;
+import 'generated/source.dart';
/// An implementation of [Source] that's based on an in-memory Dart string.
class StringSource implements Source {
@@ -16,34 +16,35 @@ class StringSource implements Source {
StringSource(this._contents, this.fullName)
: modificationStamp = new DateTime.now().millisecondsSinceEpoch;
- bool operator==(Object object) {
- if (object is StringSource) {
- StringSource ssObject = object;
- return ssObject._contents == _contents && ssObject.fullName == fullName;
- }
- return false;
- }
+ TimestampedData<String> get contents =>
+ new TimestampedData(modificationStamp, _contents);
- bool exists() => true;
+ String get encoding =>
+ throw new UnsupportedError("StringSource doesn't support " "encoding.");
- TimestampedData<String> get contents => new TimestampedData(modificationStamp, _contents);
+ int get hashCode => _contents.hashCode ^ fullName.hashCode;
- String get encoding => throw new UnsupportedError("StringSource doesn't support "
- "encoding.");
+ bool get isInSystemLibrary => false;
String get shortName => fullName;
- UriKind get uriKind => throw new UnsupportedError("StringSource doesn't support "
- "uriKind.");
+ @override
+ Uri get uri =>
+ throw new UnsupportedError("StringSource doesn't support uri.");
- int get hashCode => _contents.hashCode ^ fullName.hashCode;
+ UriKind get uriKind =>
+ throw new UnsupportedError("StringSource doesn't support " "uriKind.");
- bool get isInSystemLibrary => false;
+ bool operator ==(Object object) {
+ if (object is StringSource) {
+ StringSource ssObject = object;
+ return ssObject._contents == _contents && ssObject.fullName == fullName;
+ }
+ return false;
+ }
- @override
- Uri get uri => throw new UnsupportedError(
- "StringSource doesn't support uri.");
+ bool exists() => true;
- Uri resolveRelativeUri(Uri relativeUri) => throw new UnsupportedError(
- "StringSource doesn't support resolveRelative.");
+ Uri resolveRelativeUri(Uri relativeUri) =>
+ throw new UnsupportedError("StringSource doesn't support resolveRelative.");
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/utilities_general.dart ('k') | pkg/analyzer/lib/src/task/task_dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698