Forum Stats

  • 3,824,920 Users
  • 2,260,440 Discussions
  • 7,896,347 Comments

Discussions

Intellisense not working for current package, and not completing schema names

It seems that intellisense is not working for current package, for example calling a function within the same package works if you add the full package name before the funcion name, but if you ommit it, it doesn't shows you any recomendation. The same for local variables.


Also it would be very nice adding support for autocompleting schema names accessible by the current user.

Comments

  • Did you just compile the package? If so, you will need to refresh intellisense:

    Press the F1 Key and type "Oracle: Rebuild Intellisense Data"

    If you still can't get it working, try this:

    1) execute:

    CREATE OR REPLACE PACKAGE "HR".cshaydemo IS

    PROCEDURE test(a VARCHAR2);

    END cshaydemo;

    /


    CREATE OR REPLACE PACKAGE BODY "HR".cshaydemo IS

       PROCEDURE test(a VARCHAR2) IS

         BEGIN

          null;

         END;

    END cshaydemo;

    /

    2) Then, Press the F1 Key and type "Oracle: Rebuild Intellisense Data"

    3) Then type:

    begin

    cshaydemo.

    After typing the dot "." you should see the package name "test" pop up.

    If you do not, let me know. If you do, see if you can come up with a testcase for me to try for your situation.

  • Yevon
    Yevon Member Posts: 109 Blue Ribbon

    I extended your example adding a second procedure to the package and trying to call it within the same package, rebuilding intellisense and is not working for me also:



    But if I put the package name where I'm in, it seems to work but without autocompleting parameters:



    CREATE OR REPLACE PACKAGE BODY cshaydemo IS


       PROCEDURE test(a VARCHAR2) IS


         BEGIN


          null;

         

         cshaydemo.test


         END;


       PROCEDURE test2(a VARCHAR2, b number) IS


         BEGIN


          null;


         END;    


    END cshaydemo;

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,148 Employee
    edited May 5, 2022 1:48PM

    That's right. You need to enter the package name and then a period to kick off the intellisense of a package. Not ideal, I know. Hopefully we will get better there.

    Once you do that, select "test" and press tab for a template with all the parameters, or type a left parenthesis to be prompted one by one, eg:

    cshaydemo. [select "test"] [press tab]

    or

    cshaydemo.test(

    Yevon
  • Yevon
    Yevon Member Posts: 109 Blue Ribbon

    Thanks! It would be nice having this as the common way to do this is without specifying the name of the current package, and you usuarlly call to functions within the same package quite often.