Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 247674 - Call hierarchy doesn't work in "calls to" direction
Summary: Call hierarchy doesn't work in "calls to" direction
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: 2.1M2   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: 2.1.1   Edit
Assignee: Chris Recoskie CLA
QA Contact: Greg Watson CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-17 12:08 EDT by Chris Recoskie CLA
Modified: 2011-05-14 06:38 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (5.22 KB, patch)
2009-01-30 11:02 EST, Michael Berger CLA
g.watson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Recoskie CLA 2008-09-17 12:08:00 EDT
If you invert the call hierarchy, you often get no matches, or NPEs when calculating child nodes. 

There are two problems here.  One is that IndexQueries.elementToName() was invoking the resources plugin and causing a NoClassDefFound exception (same cause as bug 246912).  Secondly, the ICProject for the returned match's ITranslationUnit was sometimes null (this caused the NPEs)l.

Fix coming shortly.
Comment 1 Chris Recoskie CLA 2008-09-17 12:11:52 EDT
Fixed on HEAD.
Comment 2 Chris Recoskie CLA 2009-01-19 13:24:28 EST
This seems to have come back on HEAD.  There are no visible exceptions printed to the server's terminal, so I'm not sure what the problem is yet this time.
Comment 3 Michael Berger CLA 2009-01-22 16:33:18 EST
I don't see the bug with most recent checkout. Can you post a test case where this happens?
Comment 4 Chris Recoskie CLA 2009-01-23 10:05:50 EST
It seems to work (mostly) if you do "Open Call Hierarchy" and then immediately change the graph to the calls-to direction.  However, if you select a function in the view and do "Focus on", then view the calls-to, you get nothing.

I wonder if somehow the ICElement information is messed up when you do "Focus on".

Also, the calls-to direction only seems to go one level deep.  I would have thought you should be able to expand it arbitrarily.  Can you check that behaviour against the local call hierarchy?
Comment 5 Michael Berger CLA 2009-01-30 11:02:42 EST
Created attachment 124289 [details]
Proposed patch
Comment 6 Chris Recoskie CLA 2009-01-30 14:35:34 EST
Applied to 2.1.1 and HEAD.  Thanks Michael.