Bug 117027 - Improve Call Hierarchy for Anonymous Classes
Summary: Improve Call Hierarchy for Anonymous Classes
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-18 07:33 EST by Robert Klemme CLA
Modified: 2005-11-18 07:35 EST (History)
0 users

See Also:


Attachments
Test class to demonstrate the phenomenon (1.17 KB, text/x-java)
2005-11-18 07:35 EST, Robert Klemme CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Klemme CLA 2005-11-18 07:33:41 EST
This might be seen as related to bug 108219 but has a slightly different focus:
when creating a call hiearchy for a method in an anonymous class occurrences
show up that can never be called.  Consider the attached class CallHiearchyTest.
 If you look at the call hierarchies of flagged methods you'll see two entries
(action12 and action12; test21 and test22) while in reality only one is actually
able to invoke this method.

Background: we use this pattern quite frequently for db actions where method
action actually fetches a connection and automatically committs or rolls back
depending on whether an exception occurs.  Since there are a lot of these
actions the call hiearchy of every single one of them is difficult to view
because a lot of invocations are listed which never can happen.

Note: during testing of this I found a bug which I'll file in a minute.
Comment 1 Robert Klemme CLA 2005-11-18 07:35:06 EST
Created attachment 30217 [details]
Test class to demonstrate the phenomenon