6 Replies Latest reply on Feb 15, 2014 12:16 AM by Gary Graham-Oracle

    Navigating database packages

    Jeffrey Kemp

      I've just upgraded from to and was hoping that the package navigation had improved, but unfortunately doesn't seem to be - but perhaps I haven't looked in the right places yet.


      1. What keyboard shortcut exists to jump from a declaration in the package spec to its implementation in the package body, and vice versa?


      2. I tried clicking, CTRL+Up, CTRL+Down, double-click, CTRL+click, CTRL+doubleclick different declarations. Eventually it seemed to freeze for about 10 seconds, then raised a strange error "PL/SQL unit to_char does not exist"...


      Unfortunately the help system isn't very helpful in this regard. Search on "keyboard shortcuts" - suggestions are "User Preferences for Data Modeller" and "SQL Developer Usage Suggestions", which includes a smattering of keyboard shortcuts. Including this one:

      "In the window for a package definition, you can press Ctrl+click on a procedure or function name to perform the Open Declaration command, which opens the procedure or function implementation (body specification) in a new window."

      It appears this might be a bug then. I have never seen this "Open Declaration" command.


      3. I read about the blue arrows, but they sometimes appear on the wrong lines (so if you have a long list of function or proc specifications, the blue arrows appear on the blank lines in between them, which is rather confusing).


      4. CTRL+click on a function or procedure - the cursor navigates to the bottom of the package. Why?


      5. Sometimes when I click or hover over a function or procedure name it changes to blue+underline. I haven't worked out when exactly, it seem intermittent, disappears soon after, and it doesn't seem to serve any purpose. This existed in 3.2 it seems.


      All that said, I like the new breadcrumb feature.

        • 1. Re: Navigating database packages
          Nancy Wang -Oracle

          1. Move cursor to the place you need to open declaration, and then use "Shift+F10+n" to open declaration.

          2. I tried to several procedures for blue arrows, and didn't find to show wrong line; And CTRL+click on a function or procedure, the cursor not navigates to the bottom of the package. Could you please provide more detail info to reproduce them?

          • 2. Re: Navigating database packages

            My 50 cents regarding error you mentioned in 2): "Open Declaration" is pretty buggy in 4.0, see my last post in https://community.oracle.com/thread/2614644 - namely, it doesn't open external procedures/functions without schema specified while you're working in the package editor, neither can it handle mixed-case procedures in worksheet. It seems it was ignored, though.

            • 3. Re: Navigating database packages
              Nancy Wang -Oracle

              In 2: I tried clicking, CTRL+Up, CTRL+Down, double-click, CTRL+click, CTRL+doubleclick different declarations.....

              I can't reproduce using my local data, could you please tell me what is the exact reproduced steps? And the exact package/function... which you use?

              • 4. Re: Navigating database packages
                Jeffrey Kemp

                @Nancy Wang


                I can reproduce it with ANY package. Just open a package spec from the navigator, then put the cursor on a function or procedure declaration, and try to use any combination of keyboard keys to jump to the body of that function or procedure. I couldn't find any keyboard combination which would do this. For that matter, no combination of clicks or double-clicks would do it either.


                The blue arrows don't do anything either. Click, click, click - they're just not responsive.


                Shift+F10 just opens the context menu. Shift+F10+n doesn't do anything at all. The "Open Declaration" item in the Shift+F10 menu doesn't do anything either. The menu closes, and that's it.

                • 5. Re: Navigating database packages


                  I can reproduce at will only the behavior described at point 4, that is the cursor jumps to the end of the package spec.


                  To replicate it I opened a random package specification (actually any will work) in the schema you are logged into (APPS in my case), put the cursor on one of the procedure declarations and tried all of the following:

                  1) used the context menu to choose "Open declaration" option;

                  2) CTRL + click on the procedure name;

                  3) SHIFT + F10 + n;

                  In all of the above cases, the results is ALWAYS that the cursor jumps to the end of the package specification.


                  Actually I have noticed that even if you CTRL + click anywhere in the package spec (also on white space or comments), the cursor ALWAYS jumps to the end of the package specification. The blue arrows instead are working fine for me.


                  Anybody cares to open a bug for it?




                  • 6. Re: Navigating database packages
                    Gary Graham-Oracle

                    Hi Jeff,


                    Actually the Ctrl+<click> only works within a package body to jump to the declaration of a function and procedure (and only within the same package for all I know).  Same thing if you assign a new shortcut key for Open Declaration in the preferences.  So one might say not jumping between the spec and body is a bug (it should either do it or not display the Open Declaration item in the package spec context menu), or that someone should log an enhancement request over at the SQL Developer Exchange: http://sqldeveloper.oracle.com



                    SQL Developer Team


                    P.S.:  Arpod's "50 cents regarding error" is worth reading.  The following bug was logged based on that discussion:

                    Bug 18038089 - FORUM: OPEN DECLARATION BUGS


                    Message was edited by: Gary Graham