Reputation: 833
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.
Upvotes: 11
Views: 50659
Reputation: 51
After opening the package spec using Shift+F4, press Ctrl+Shift+F12 to open or toggle between body and spec
Upvotes: 3
Reputation: 22427
You have a couple of questions:
How to 'jump into' a pl/sql object
Ctrl+Mouse Hover+Click
If you don't like this mouse-kung-fu, you can also assign a keyboard shortcut, I show you how to do this here.
How to toggle from spec to body and back
You can use the arrows in the gutter, they point up or down, you can use the toolbar button, or you can use the keyboard shortcut.
If you use the 'arrow' in the gutter, you'll go straight to that item's corresponding bit in the spec or body. Using the toolbar button/kb shortcut will just take you to line 1 of the spec or body.
I talk about these PL/SQL features and more on my blog.
Upvotes: 1
Reputation: 3950
see the picture above-- the downward pointing side arrow -- click on it-- it will open up the function defintion. thanks
Upvotes: 7
Reputation: 8395
(this is at least with my PLSQL-DEv version (11.0.4.1774), default settings)
The shortcut to view Spec. + Body is SHIFT+ F5, then CTRL+ H to toggle to the "body" tab.
This works if you have certain rights to view the package's body, especially the DEBUG
right: ask your DBA to do you a
GRANT DEBUG on <package_you_want_to_view_the_body_of> to <your_user>
or
GRANT DEBUG on <package_you_want_to_view_the_body_of> to PUBLIC
Note sure but you might also need the EXECUTE
right just to view. Same thing if needed, ask your DBA similar above grant.
Another thing I had to do in Oracle 12c for Code assistant to view the packages when typing: check the "Use DBA Views if available" in Tools > preferences:
Upvotes: 0
Reputation: 21
Go to VIEW menu, click on find DB objects option. In the find db object pane put the name of the package and select the DB.
Both, the spec and body will appear, double click to open.
Upvotes: 2