Code Contents Don't List with Q-Quote Operator in Package Body

geekmuse

Member²
Hi,

I have a package body that contains a generous amount of HTML and JavaScript code, which is included in functions/procedures using the Q-quote operator, most often using "%" as the quoting delimiter. Code compiles with no issues or warnings using sqlplus, and the code functions as anticipated. However, PL/SQL Developer's Code Contents list no functions or procedures for the package body. If I remove my Q-quoted code, the functions/procs appear in Code Contents again.

Using version 10.0.04.1708 01.90994 with Oracle 11g.

Thanks,
Brad
 
Not of my work-related code, as it's all NDA-bound and IP-protected. I can certainly create something that should do the trick, though it may take an evening or two for me to get something for you.
 
Last edited:
Marco,

I found the line in my code that was causing the issue.

Basically going from this:

Code:
htp.p(q'%
             -- a lot of javascript;
             var js = '%'||v_plsql_var||q'%';
             -- a lot more javascript;
        %');

to this:

Code:
htp.p(q'%
        --a lot of javascript;
      %');
htp.p('var js = '''||v_plsql_var||'''');
htp.p(q'%
        --a lot more javascript;
      %');

solves the issue.

SQL*plus doesn't discriminate between either of the above cases; each compiles and produces expected output. However, only the latter snippet causes functions and procedures to be listed in PL/SQL Developer's Code Contents pane -- the first causes an empty list.

P.S.: The "--" comments in the q'' blocks are for visualization only; they would certainly break in multi-line PL/SQL code!
 
Last edited:
I found another highliting issue, when used parentheses within quoted text
This works fine:

Code:
SELECT q'[package.Procedure('valx');]' FROM dual

If i use parentheses within text highliting fails:
- ";]" is highlited as code
- " FROM dual" is highlited as text

Code:
SELECT q'[package.Procedure('val(x)');]' FROM dual

I could reproduce this issue in last version of PSD 11.0.2 and 10.0.5
 
Back
Top