IDEA-89324 File structure: cannot find super class method definition when anonymous classes are shown

This commit is contained in:
Konstantin Bulenkov
2012-07-31 00:14:39 +02:00
parent 9ff611fa15
commit 83d0d448f2
4 changed files with 10 additions and 9 deletions
@@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
public class A<caret> {
import java.lang.Object;
public class A<caret> extends Object {
void foo() {
Object myObject = new Object(){};
}
@@ -1,6 +1,3 @@
-A.java
-AnonymousHashCode.java
-A
-[hashCode(): void]
-foo(): void
-$1
hashCode(): int
[hashCode(): int]
@@ -33,5 +33,5 @@ public class JavaFileStructureHierarchyTest extends JavaFileStructureTestCase {
public void testSimple() throws Exception {checkTree();}
public void testAnonymousAsConstantInInterface() throws Exception {checkTree("getA");}
//public void testAnonymousHashCode() throws Exception {checkTree("hash");}
public void testAnonymousHashCode() throws Exception {checkTree("hash");}
}
@@ -67,15 +67,17 @@ public class FilteringTreeStructure extends AbstractTreeStructure {
} else {
ArrayList<FilteringNode> nodes = new ArrayList<FilteringNode>(delegates.length);
for (Object d : delegates) {
FilteringNode n = new FilteringNode(node, d);
boolean isDuplicate = myDescriptors2Nodes.containsKey(d);
if (!isDuplicate) {
FilteringNode n = new FilteringNode(node, d);
myDescriptors2Nodes.put(d, n);
nodes.add(n);
addToCache(n, isDuplicate);
}
}
myNodesCache.put(node, nodes);
for (FilteringNode n : nodes) {
addToCache(n, false);
}
}
}