Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLDeveloper jump between Package body and Package spec

I'm currently using Oracle SQLDeveloper a lot more that I have ever used and I'm starting to like the tool.

I use Shift+F4 a lot to jump into a package/function/procedure. But one thing that I don't really get is how to jump directly to the package body or as an alternative some kind of shortcut that toggles between the spec and the body of a package.

Toad has something like this and I'm unable to find this feature in SQLDeveloper.

I'm also aware that you have the object tree on the left side of the screen but it's not really the best way to navigate to a package body when you are already looking at its specification. Especially if you have something like 300 packages with similar names...

For someone that uses SQLDeveloper to work everyday and does a lot of development with packages there has to be a way to do this...

I'm hoping for some magical shortcut or some obscure plugin.

like image 637
JGS Avatar asked Apr 10 '14 15:04

JGS


People also ask

What is the difference between package and package body in Oracle?

A PL/SQL package consists of two parts: package specification and package body. If the package specification has cursors or subprograms, then the package body is mandatory. Otherwise, it is optional. Both the package body and package specification must be in the same schema.

Can we create a package specification without package body?

Can we create a package Specification without body ? Yes, and these are quite useful when the package only contains variable and/or type declarations, e.g.

Which part of a package must be created first the specification or the body?

The body contains the detailed code of the subprograms. Variables can be declared in the body. The specification must be created before the body.

Can we compare two files in SQL Developer?

Right-click on the body of the stored procedured from the database. select compare option. select with other file option.


2 Answers

enter image description here

see the picture above-- the downward pointing side arrow -- click on it-- it will open up the function defintion. thanks

like image 192
nikhil sugandh Avatar answered Sep 20 '22 19:09

nikhil sugandh


After opening the package spec using Shift+F4, press Ctrl+Shift+F12 to open or toggle between body and spec

like image 32
Rajaraman Iyer Avatar answered Sep 19 '22 19:09

Rajaraman Iyer