Oracle SQL Developer 4 and Auto Spec – Body Toggles

thatjeffsmith SQL Developer 8 Comments

Tell Others About This Story:

I’ve been running version 4 for so long, that I have trouble remembering if some features are new to version 4. Well, here’s a simple feature that IS new to version 4 that I think our PL/SQL friends will appreciate.

Say that you’re looking at a PACKAGE SPEC member, like a FUNCTION, and I want to ‘jump’ to the BODY implementation of said FUNCTION.

Or vice versa, I’m in the BODY and I want to jump to the SPEC.

Just click the little ‘blue’ up and down arrow buttons.

Down arrow goes to body, up arrow goes to spec

Down arrow goes to body, up arrow goes to spec

Or Watch the Movie

Go from spec to body to spec with just 2 clicks

Go from spec to body to spec with just 2 clicks

Tell Others About This Story:

Comments 8

  1. Nice feature, but it seems a bit lacking in comparison to other tools that have done this for ages. Firstly, it doesn’t seem to have a keyboard shortcut. Secondly, when you open the package body, jump to the spec, then jump back to the body, it opens a new editor for the package body – so now I have the body open twice. Finally, the blue arrow doesn’t seem to always align to the actual declaration – sometimes it appears on the next line down, which is a blank line.

    1. thatjeffsmith Post
      Author

      No keyboard shortcut – correct, but a good enhancement for the next go-around.

      If I open the Spec, toggle to the Body, and back – no extra package editor. I see what you’re saying if you start in the Body though. That’s a bug, and I’ll log that.

      ‘doesnt seem to always align to the actual declaration’ – can you find me a std SYS package that exhibits this behavior, or share one of yours? I’m not seeing that.

      1. This morning after a restart the alignment problem seems to have fixed itself. Yesterday when it was putting the blue arrows on the wrong line, I did notice that SQL Developer was also putting the wavy red line underneath the semicolons for some reason – these have also disappeared. Might be related.

  2. Hi Jeff,

    I am running SD version 4.0.0.12 build 12.84 and i don’t see the blue arrows. Is there a setting somewhere what has to bee set?

  3. Jeff,

    I am using sql-developer 4.0.0.12 against 10.2.0.5 database. I opened a package spec i don’t see “up arrow” and “down arrow” – do we need to set anything in preference to get this arrows ?

    1. thatjeffsmith Post
      Author

      Erik, Rajesh, and Kees –

      I forgot that the Breadcrumbs feature broke in EA2, and this feature is tied to that. This was working in EA1, broke in EA2, and got fixed for EA3. So something to look forward to in the immediate future.

      My bad, I should have waited to post this till EA3 or you can go back to EA1 and play with this.

      I have EA1 and EA2 both going, and if you want to do something crazy like that – it will work just fine.

Leave a Reply

Your email address will not be published. Required fields are marked *