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

Unified Diff: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniElement.java

Issue 10510012: Searchbox proposals go async (and some cosmetic fixes). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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.tools.deploy/src/com/google/dart/tools/ui/omni/OmniElement.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniElement.java (revision 8261)
+++ editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/omni/OmniElement.java (working copy)
@@ -134,9 +134,25 @@
}
/**
- * @param filter
- * @return
+ * Tests for equivalency ("equalness" without the contract of {@link Object#equals(Object)}.
+ *
+ * @param that the element to test against
+ * @return <code>true</code> if this element is the "same as" or "equivalent to" the other,
+ * <code>false</code> otherwise
*/
+ public boolean isSameAs(OmniElement that) {
+ if (that == null) {
+ return false;
+ }
+ if (this == that) {
+ return true;
+ }
+ if (this.getProvider() == that.getProvider()) {
+ return this.getLabel() == that.getLabel();
+ }
+ return false;
+ }
+
public OmniEntry match(String filter, OmniProposalProvider providerForMatching) {
String sortLabel = getMatchText();

Powered by Google App Engine
This is Rietveld 408576698