Summary: | Variables view: Logical Structure only allows to expand first of two identical children | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | pawel.1.piech, sarika.sinha |
Version: | 3.6 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: | stalebug |
Description
Markus Keller
2010-07-22 11:08:31 EDT
*** Bug 356543 has been marked as a duplicate of this bug. *** The following implementation of equals in JDIArrayEntryVariable is responsible for the bug. I don't know the background for this comparing array elements based on value when they're in a logical structure.. perhaps it's a performance optimization. However when multiple elements in the flex viewer tree at the same level are equal to each other, the viewer updates get messed up. public boolean equals(Object obj) { if (obj instanceof JDIArrayEntryVariable) { JDIArrayEntryVariable entry = (JDIArrayEntryVariable)obj; if (fLogicalParent != null) { try { return fLogicalParent.equals(entry.fLogicalParent) && getValue().equals(entry.getValue()); } catch (CoreException e) { } } return entry.getArrayReference().equals(getArrayReference()) && entry.getIndex() == getIndex(); } return false; } Actually, it looks like the getValue().equals(entry.getValue()) in equals; was actually meant to be getIndex() == entry.getIndex(), because the hashCode() refers to getIndex() public int hashCode() { if (fLogicalParent != null) { return fLogicalParent.hashCode() + getIndex(); } return getArrayReference().hashCode() + getIndex(); } This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. Still the same. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |