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.

http://screencast.com/t/YI8v0luHWA

18 comments
Comment actions Permalink

Please try to using Alt+Ctrl(Cmd)+B or Ctrl(Cmd)+Shift+B action to navigate to a type declaration. Does it help?

0
Comment actions Permalink

I have tried and it does not work.  Seem like IDE is not aware of declaration and implementation segments in pl/sql packages. 

 

 

0
Comment actions Permalink

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?

0
Comment actions Permalink

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.

0
Comment actions Permalink

What DataGrip version do you use (DataGrip | About dialog)? Please try last version from https://confluence.jetbrains.com/display/DBE/DataGrip+2016.1+EAP

0
Comment actions Permalink

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 

0
Comment actions Permalink

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).

0
Comment actions Permalink

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

0
Comment actions Permalink

This will also be addressed. Thanks.

0
Comment actions Permalink

I would also like this!

0
Comment actions Permalink

@Andrey Are there any news?

0
Comment actions Permalink

Mubin Umarov,

What sort of problems in navigation do you experience now?

0
Comment actions Permalink

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

0
Comment actions Permalink

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.

1
Comment actions Permalink

Mubin Umarov,

Thank you for detailed steps to reproduce.

UPD:
I reproduced the issue and submitted one https://youtrack.jetbrains.com/issue/DBE-13790

0
Comment actions Permalink

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.

1
Comment actions Permalink

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?

0

Please sign in to leave a comment.