Jump to Implementation (instead to declaration)
Answered
It would be very useful to quickly navigate from code to actual implementation of procedure/function when working with oracle database packages.
Instead of navigating to package it would be much more useful to navigate to package body. Or maybe even better to be able to quickly navigate from declaration of procedure/function to actual declaration in package body.
Please sign in to leave a comment.
Please try to using Alt+Ctrl(Cmd)+B or Ctrl(Cmd)+Shift+B action to navigate to a type declaration. Does it help?
I have tried and it does not work. Seem like IDE is not aware of declaration and implementation segments in pl/sql packages.
Navigation between function declaration and implementation (package body and package specification) should work.
From specification to body:
From body to specification:
Do you mean the navigation from usage of the package function to the function implementation in the package body?
HI,
I would like this functionality also when browsing through ddl sources.
http://screencast.com/t/FyxtwxjJmH6
Even if I try to navigate via database package editor I do not see that option
http://screencast.com/t/zKmWwpzF
??
Do you mean the navigation from usage of the package function to the function implementation in the package body?
Yes! That would be the best option.
What DataGrip version do you use (DataGrip | About dialog)? Please try last version from https://confluence.jetbrains.com/display/DBE/DataGrip+2016.1+EAP
I was using latest stable release. Now I upgraded to latest EAP (April 6th) and still do not see go to spec/impl icon.
http://screencast.com/t/cGhUmM48kJL5
http://screencast.com/t/L0pmKABnW96
Thank you for the information. There are known issues with navigation for the Oracle packages sources. We are planning to address them (including navigation from package function usage in SQL console/file to the actual package code) in the summer (DataGrip 2016.2.X versions).
I would also like to report this related issue. When package constant is being referred in code, seems like code navigation is also not available.
http://screencast.com/t/MvsPVhI6r
This will also be addressed. Thanks.
I would also like this!
@Andrey Are there any news?
Mubin Umarov,
What sort of problems in navigation do you experience now?
I'm unable to navigate from package specification to package body to see implementation of procedures/functions. It just does nothing when I click the icon (green circle with "I" with bottom arrow for navigating from spec to body and vice versa).
DataGrip 2021.1.3
Build #DB-211.7442.53, built on June 7, 2021
vasily chernov I've noticed now that it works if I opened package body AND package spec at least once. Steps to reproduce the bug:
1. Ctrl+click on procedure call. For example i Ctrl+click on "some_package.some_procedure"
2. Package spec of "some_package" is opening at "some_procedure" specification
3. Click on when I want to navigate to implementation of some_procedure in package body.
HERE if I have never opened some_package spec and body earlier in current session it just DOESN'T WORK.
IT START to work after opening some_package body explicitly from database objects hierarchy.
Mubin Umarov,
Thank you for detailed steps to reproduce.
UPD:
I reproduced the issue and submitted one https://youtrack.jetbrains.com/issue/DBE-13790
vasily chernov
I confirm the problem
on Oracle 11g
- if I do Ctrl + click on the method name - DataGrip opens its specification
- if I click on the "Go to routine definition" icon, nothing happens until I manually open the body in a new tab.
It is very uncomfortable.
After resolution of https://youtrack.jetbrains.com/issue/DBE-13790 navigation is start working if I click on gutter icon "Go to routine definition" - thanks for that!
But if I try to push hotkeys Ctrl-Alt-B that is highlighted in gutter icon hint - it returns No implementation found. Is it possible to fix this?
IntelliJ IDEA 2022.2.2 (Ultimate Edition)
Oracle 19c
PS: IMO the most convenient way for navigation is implemented in PL/SQL developer: Ctrl+left click navigates to specification, Ctrl+right click to implementation (body). Is it possible to do the same in Idea?
Aazayka,
Thank you for feedback! I created a new issue https://youtrack.jetbrains.com/issue/DBE-16452/Fix-hot-key-navigation-for-Oracle-packages you can track and up vote
This is still an issue. I can't go to the implementation of routines defined inside a package. All it can show is the declaration. I'm on IntelliJ 2023.2.4
Clicking the implementation icon does nothing. Ctrl+Click or Ctrl+Alt+Click on the declaration does nothing either.
Edit: this is the result of Ctrl+Alt+Click
Guilherme Taffarel Bergamin Unfortunately we have this mentioned bug for implementation of packages here - https://youtrack.jetbrains.com/issue/DBE-16361/Go-to-Implementations-doesnt-work-for-packages - Follow to receive updates.
Thanks Miguel Monteiro
Strange- for me IntelliJ IDEA 2023.2.2 (Ultimate Edition) - everything is working fine. I can navigate between oracle's package spec and body using both hot keys and gutter icons.
Guilherme Taffarel Bergamin , Aazayka could you elaborate and provide some examples to reproduce the issue?
vasily chernov, To reproduce this, I assume you just need to add functions to a package. Check the example I printed above.
That's an Oracle database
Edit: I replied with the wrong account, but see my first name in the other message