Questions tagged [call-hierarchy]

Call Hierarchy enables you to navigate through your code by displaying all calls to and from a selected method, property, or constructor. This enables you to better understand how code flows and to evaluate the effects of changes to code. You can examine several levels of code to view complex chains of method calls and additional entry points to the code, which enables you to explore all possible execution paths.

50 questions
45
votes
6 answers

Order of calling constructors/destructors in inheritance

A little question about creating objects. Say I have these two classes: struct A{ A(){cout << "A() C-tor" << endl;} ~A(){cout << "~A() D-tor" << endl;} }; struct B : public A{ B(){cout << "B() C-tor" << endl;} ~B(){cout << "~B()…
Bug
  • 475
  • 1
  • 5
  • 4
37
votes
12 answers

Eclipse IDE - Open Call Hierarchy is empty/broken

What should I do, if the "Open Call Hierarchy" is broken (empty for every method in a project)? It only shows the name of the method I wanted to see the call hierarchy for. This happens for all methods I try, even though they are all called by…
Skip
  • 6,240
  • 11
  • 67
  • 117
28
votes
4 answers

IntelliJ call hierarchy of fields

Eclipse JDT has a 'call hierarchy' feature -- start from a field/method and it recursively finds all references. IntelliJ also implements this, but it only works from methods. For fields, you can only 'Find Usages', so if you want to dig deeper you…
Valentin Milea
  • 3,186
  • 3
  • 28
  • 29
21
votes
2 answers

Eclipse - `open call hierarchy` stop searching in lambda chain

Here is my sample java code: public class Test { public static void main(String[] args) { methodDepth0( ()-> methodDepth1( ()-> methodDepth2() ) …
andyf
  • 3,262
  • 3
  • 23
  • 37
20
votes
10 answers

how to trace function call in C?

Without modifying the source code, how can i trace which functions are called and with what parameters, when some function(say func100 in the following example) is invoked. I would like the output to be as follows: enter…
Andrew
  • 231
  • 1
  • 2
  • 6
10
votes
8 answers

Filter Eclipse's "Open Call Hierarchy" to just my company/project

One of my favorite features of Eclipse is the ability to open a caller/callee hierarchy of a method. By default, the view shows calls to/from classes that are outside of my codebase... which I don't usually care about. There is an option to filter…
Dolph
  • 49,714
  • 13
  • 63
  • 88
8
votes
1 answer

Call hierarchy from a certain function

Background: Working in eclipse, I have two function: do_something and perform_task. I know that do_something calls a number of other functions which in turn call others (and so on and so on) and somewhere down the line perform_task gets called as…
shapiro yaacov
  • 2,308
  • 2
  • 26
  • 39
7
votes
0 answers

Including JSP calls in Call Hierarchy of Eclipse

How can I get Eclipse Call Hierarchy to support calls in JSP files? I am an avid user of the Call Hierarchy feature of Eclipse, as it helps me navigate and find all call sources of a method or other entity. But I find that the Call Hierarchy listing…
ADTC
  • 8,999
  • 5
  • 68
  • 93
7
votes
1 answer

Eclipse “Open Call Hierarchy” across the whole working set/workspace

Is there a way to extend the “Open Call Hierarchy” function to the whole working set or workspace? (i.e. across multiple projects) This would be very handy when searching for deprecated methods and dependencies.
lilalinux
  • 2,903
  • 3
  • 43
  • 53
6
votes
1 answer

How can we programmatically get call hierarchy for methods in IntelliJ

Getting call hierarchy is easy in IntelliJ. Simply use the built in tool. But is there a way to do it using code? Eclipse internal JDT has two classes called CallHierarchy and MethodWrapper that help to do so: link If there is no equivalent in…
teddy
  • 518
  • 2
  • 14
6
votes
3 answers

More Intelligent Eclipse "Open Call Hierarchy"?

If I have a Java project in Eclipse, I can right-click on a method name and "Open Call Hierarchy." Suppose I have two interfaces, A and B, that both specify a method x(). Is it possible for me to have Eclipse use "Open Call Hierarchy" in a more…
Michael McGowan
  • 6,528
  • 8
  • 42
  • 70
5
votes
1 answer

Get method calls of IMethod through eclipse CallHierarchy

I am looking to get IMethod, IType or IJavaElement in which a IMethod is being called. I explored org.eclipse.jdt.internal.corext.callhierarchy.CallHierarchy. I have written this code but its not giving me anything in wrapper or in location. Please…
Ali Arslan
  • 1,027
  • 10
  • 24
5
votes
1 answer

ensuring one method's call stack always includes another method in Java

I have a design problem in a common utility that we use in our Java project where I want to ensure that all callers of a particular method A are wrapped by another method B. The general form of this code as I've written it today is: x.B(new…
Dan
  • 7,155
  • 2
  • 29
  • 54
5
votes
0 answers

eclipse call hierarchy incomplete

When I execute a call hierarchy (Eclipse Indigo) the results I receive are fewer than I know exist. Strange thing is this functionality seemed to be working only a few weeks ago. When I run the same operation on the same workspace in Juno I get…
ABC123
  • 1,037
  • 2
  • 20
  • 44
5
votes
1 answer

Eclipse call hierarchy for CDT not fully working

The eclipse call hierarchy for CDT is not showing all function calls for some of my functions. All of my source is within the project folder. I tried adding the locations to project->properties->C/C++ General->Paths and Symbols and rebuilt the index…
Alex
  • 712
  • 2
  • 13
  • 27
1
2 3 4