Bug 56732 Call Hierarchy doesn't show callees of method from anonymous type
3.0M8: Call Hierarchy doesn't show callees of method from anonymous type. Callees of m() are correctly shown: println(String) and Runnable. However, callees of run() are empty, although run() calls println(String). class A { void m() { System.out.println("before"); Runnable runnable= new Runnable() { public void run() { System.out.println("run"); } }; runnable.run(); } }
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CallHierarchyTest.java
expectedMethodsTo3.add(helper.getMethod1());
        expectedMethodsTo3.add(helper.getMethod2());
        helper.assertCalls(expectedMethodsTo3, wrapper2.getCalls(new NullProgressMonitor()));
    }
    public void testCalleesNoResults() throws Exception {
        helper.createSimpleClasses();
        IMethod method= helper.getMethod1();
        Collection expectedMethods= new ArrayList();
        MethodWrapper wrapper= CallHierarchy.getDefault().getCalleeRoot(method);
        MethodWrapper[] uncachedCalls= wrapper.getCalls(new NullProgressMonitor());
        helper.assertCalls(expectedMethods, uncachedCalls);
        MethodWrapper[] cachedCalls= wrapper.getCalls(new NullProgressMonitor());
        helper.assertCalls(expectedMethods, cachedCalls);
    }
    public void testRecursiveCallers() throws Exception {
        helper.createSimpleClasses();
        IMethod method1= helper.getRecursiveMethod1();
        IMethod method2= helper.getRecursiveMethod2();
        Collection expectedMethodsTo1= new ArrayList();
        expectedMethodsTo1.add(method2);
        Collection expectedMethodsTo2= new ArrayList();
        expectedMethodsTo2.add(method1);
        MethodWrapper wrapper= CallHierarchy.getDefault().getCallerRoot(method1);
        MethodWrapper[] callsTo1= wrapper.getCalls(new NullProgressMonitor());
        assertRecursive(callsTo1, false);
        MethodWrapper wrapper2= helper.findMethodWrapper(method2, callsTo1);
        assertFalse("Should be marked as recursive", wrapper2.isRecursive());
        MethodWrapper[] callsTo2= wrapper2.getCalls(new NullProgressMonitor());
        helper.assertCalls(expectedMethodsTo2, callsTo2);
        assertRecursive(callsTo2, true);