Toad World® Forums

Return to previous function/procedure after ctrl-click


#1

Hello, all,

I’m relatively new to Toad (v 12.1.0.22). I like that I can Ctrl-Click an identifier to go to that function/procedure. I’ve used this, so far, to try and follow my way through a package. However, what I’ve not figured out is how I gracefully get back to the previous function/procedure to continue my way through the code. Is there a shortcut or button for this?


#2

Alt+Left and Alt+Right. There are also buttons on the Editor’s toolbar (top row near the center) to do this. They have images of forward and back arrow within blue circle.


#3

By the way, the same shortcuts will let you go forward and back through the Schema Browser history.


#4

@Michael Staszewski and @John Dorlon, I tried those buttons, but they don’t do what I’m asking here. Maybe I’m not doing something correctly or need a setting checked, but here’s what I’m experiencing. For example, let’s say I have a package with the following functions.

FUNCTION get_number_plus_one (myNumber NUMBER)

RETURN NUMBER IS

BEGIN

RETURN myNumber + 1;

END;

FUNCTION do_something ()

RETURN VARCHAR2 IS

v_isZero VARCHAR2(1);

BEGIN

v_isZero := get_number_plus_one(0);

IF (v_isZero = 0) THEN

RETURN ‘Y’;

ELSE

RETURN ‘N’;

END IF;

END;

When I Ctrl-Click get_number_plus_one inside of do_something, it takes me to the definition of get_number_plus_one(). When I then click the back arrow, it takes me to the last table/package/object I visited in the Schema Browser. It doesn’t return me to do_something. My goal is to look through a function, and when I see it call another function, go look at the second function, and then return back to the first function where I left off.


#5

Oh, it sounds like you are actually in the Schema Browser. I think Michael and I both assumed that you were in the Editor. In the Editor, the Alt+Left/Right will do as Michael described. In the Schema Browser, these shortcuts take you to the previous/next objected visited on the LHS, as you observed.

There is no way to go back to the prior place in the current package in the SB, sorry about that.


#6

Yes, yes, YES! Thank you @John Dorlon! That is what I was missing. So, if I want to explore a function/procedure from the Schema Browser, open the function/procedure in the Editor first. Got it! You just lowered my frustration level a lot. Thanks also to you @Michael Staszewski, since you were pointing me in the right direction as well.