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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/source/NonExistingSource.java

Issue 351283003: Move Tokenfactory, AstFactory and ElementFactory from tests to the testing/ Folder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/source/NonExistingSource.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/source/NonExistingSource.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/source/NonExistingSource.java
index 8a6d6f178d49ee4580dffc11fc69598574d0d143..e2c8ecf11c477a8249b21a5dbbc6e099360f54d4 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/source/NonExistingSource.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/source/NonExistingSource.java
@@ -14,6 +14,7 @@
package com.google.dart.engine.source;
import com.google.dart.engine.internal.context.TimestampedData;
+import com.google.dart.engine.utilities.general.ObjectUtilities;
import com.google.dart.engine.utilities.translation.DartOmit;
import java.net.URI;
@@ -33,6 +34,15 @@ public class NonExistingSource implements Source {
}
@Override
+ public boolean equals(Object obj) {
+ if (obj instanceof NonExistingSource) {
+ NonExistingSource other = (NonExistingSource) obj;
+ return other.uriKind == uriKind && ObjectUtilities.equals(other.name, name);
+ }
+ return false;
+ }
+
+ @Override
public boolean exists() {
return false;
}
@@ -75,6 +85,11 @@ public class NonExistingSource implements Source {
}
@Override
+ public int hashCode() {
+ return name.hashCode();
+ }
+
+ @Override
public boolean isInSystemLibrary() {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698