Thanks, everyone, for your thoughtful and helpful answers. That helped me sharpen what I was looking for. Let's see if this resonates.
The app I'm working on has, as expected, loads of units and some of the use cases traverse several units and involve many classes and methods.
Instead of chasing the flow all over the place, I'd like a view that starts with a method of interest and provides a collapsed view of the calling sequences. Note: I don't want the view to be semantically smart, trying to figure out which overloaded method to call. I want that view to collate all the methods that could be involved and present them in a collapsible view. An example will help explain what I'm after:
Type
Class1 = Class
Procedure MethodA1;
function MethodB1: Boolean;
Procedure MethodC1;
end;
Class2 = Class
private
FObect1 : Class1;
public
Procedure MethodA2;
Procedure MethodB2;
end;
Procedure Class1.MethodA1;
begin
//Code not involving methods from Class1 or Class2
end;
function Class1.MethodB1: Boolean;
begin
//Code not involving methods from Class1 or Class2
end;
Procedure Class1.MethodC1;
begin
//Code not involving methods from Class1 or Class2
end;
Procedure Class2.MethodA2;
begin
If X > Y
then begin
//Code block not involving methods from Class1 or Class2
fObject1.MethodA1
//More code not involving methods from Class1 or Class2
end
else MethodB2;
end;
Procedure Class2.MethodB2;
begin
If fObject1.MethodB1
then begin
// Code block here that doesn't call any method of Class1 or 2.
MethodA2;
end
else fObject1.MethodA1;
end;
Imagine that Class1 and Class2 are in different units. I'd point the (imaginary) code explorer to Class2.MethodB2. I'd configure it to ignore all calls except for those involving methods from Class1 and Class2. It would produce the following view:
Procedure Class2.MethodB2
If [ + ] fObject1.MethodB1 (it copies the conditional without understanding it)
then [ + ] MethodA2 (it ignores code that doesn't involve methods from Class1 and Class 2
else [ + ] fObject.MethodA1
If it encounters an expression involving a method call from Class1 and Class2, it offers the option to include the expression verbatim or strip it down to the methods of Class1 and Class2.
Notice the [ + ]: If I click on them, they expand the methods by showing me the same structure, so I can follow the calling sequence all in one place, without having to jump around. It would also be nice to associate that summarized view with a commentary to help me keep track of the flow.
Does this make sense?