Pacakge body structure broken when multiple level loop statement in procedure (Oracle 11.2) DataGrip 2017.1.1

When a procedure or a function in the package body has a multiple level loop with cursors inside the procedure/function begin end statement then the project structure becomes invalid.

For example if you have a package that in the spec has one function and in the body there is 4 seperate functions.

SPEC
Function 1

BODY
Function 1
Procedure 2
Function 3
Function 4

And function 3 or function 2 or function 1 has a multiple loop level statement then the structure does not show the procedures or functions following that procedure or function in the body structure on the right hand side.

create or replace package SCOTT.PACKAGE_1
IS

FUNCTION func1 (p_val1 VARCHAR2) RETURN BOOLEAN;

END;

 

CREATE OR REPLACE PACKAGE BODY ICEFIRE.PACKAGE_1
IS

FUNCTION func1 (p_val1 VARCHAR2) RETURN BOOLEAN
IS
l_tmp NUMBER;
CURSOR c_cur (p_varchar1 VARCHAR2) IS
select 1 from dual;

CURSOR c_cur2 (p_varchar2 VARCHAR2) IS
select 1 from dual;
BEGIN
FOR y IN c_cur (p_varchar1 => 'X')
LOOP
FOR x IN c_cur2 (p_varchar2 => 'X')
LOOP
dbms_output.put_line('x');
END LOOP;
END LOOP;
RETURN TRUE;
END;

PROCEDURE proc1 (p_val1 NUMBER)
IS
BEGIN
NULL;
END;

FUNCTION func3 (p_val1 NUMBER) RETURN BOOLEAN
IS
BEGIN
RETURN TRUE;
END;

FUNCTION func4 (p_val1 NUMBER) RETURN BOOLEAN
IS
BEGIN
RETURN TRUE;
END;
END PACKAGE_1;


Current example does not show func3, proc2, func4 on the right hand side if you are browsing the package body.
The idea is to have FOR statements with cursors. That seems to do the trick. The code is valid and compiles in the oracle database with no errors on sql developer for example.

1

Thank you for reporting. Please follow the https://youtrack.jetbrains.com/issue/DBE-4444 issue for progress.

0

请先登录再写评论。