Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2009-11-18 16:18:24 -0500
committerMike Kucera2009-11-18 16:18:24 -0500
commitaade7640c3d241c05a6bcb61a31f2d3cdf8add6f (patch)
tree60fab13a3370efd650a5cfa4fab11559f9fe5ba2
parent85cd3751d53946c754e8e3c7f55b7ea214d7eac6 (diff)
downloadorg.eclipse.cdt-aade7640c3d241c05a6bcb61a31f2d3cdf8add6f.tar.gz
org.eclipse.cdt-aade7640c3d241c05a6bcb61a31f2d3cdf8add6f.tar.xz
org.eclipse.cdt-aade7640c3d241c05a6bcb61a31f2d3cdf8add6f.zip
Bug 261287 - Includes Grouping can get confused - backport to 5.0 stream
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java
index 26b8a74e04..3e2e6c5021 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/IncludeReferenceProxy.java
@@ -76,9 +76,24 @@ public class IncludeReferenceProxy extends CElementGrouping {
*/
@Override
public boolean equals(Object obj) {
- return reference.equals(obj);
+ if (this == obj) {
+ return true;
+ }
+ if (!(obj instanceof IncludeReferenceProxy)) {
+ return false;
+ }
+ IncludeReferenceProxy other = (IncludeReferenceProxy) obj;
+ return reference.equals(other.reference);
}
+ /*
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return reference.hashCode();
+ }
+
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/

Back to the top