Re: SQL Developer line numbers

From: <niall.litchfield_at_gmail.com>
Date: Tue, 19 Mar 2019 16:20:06 +0000
Message-ID: <CABe10sbsxA70pD0vzT7b_909v8v=NbmHQzZiRtbWbe43y7D_NQ_at_mail.gmail.com>



I think Paul's test case would be something like

create or replace package errors_much as

procedure x (a in integer);

procedure y (b in date);

end errors_much;

/

create or replace package body errors_much as

procedure x (a in integer) is

begin

 return a;

end x;

procedure y (b in date) is

begin

retrun b;

end y;

end errors_much;

/

That gives me in 18.<quickly checks 3>

  • Error(8,8): PLS-00103: Encountered the symbol "B" when expecting one of the following: := . ( _at_ % ; The symbol ":=" was substituted for "B" to continue.

when the error is on line 8 of the package body, but line 15 of the script. Double-clicking the error takes me to script line 9 :)

On Tue, Mar 19, 2019 at 3:53 PM Jeff Smith <jeff.d.smith_at_oracle.com> wrote:

> I ran the entire script – contents of the sql worksheet, and I executed
> JUST the package, both seemed to work.
>
>
>
> I tested this on 18.4 and 19.1 (what we’re working on internally now)
>
>
>
> Here’s exactly what I have in my worksheet, and executed via F5
>
>
>
>
>
> select 1 from dual;
>
>
>
> set serveroutput on
>
> begin
>
> dbms_output.put_line('hello, Oracle-l!');
>
> end;
>
> /
>
>
>
> create or replace package errors_much as
>
> procedure x (a in integer);
>
> procedre y (b in date);
>
> end package errors_much;
>
> /
>
>
>
> select 3 from dual;
>
>
>
> select sysdate from dual;
>
>
>
>
>
>
>
> Both times it took me right to
>
> procedre y (b in date);
>
>
>
> Jeff
>
>
>
>
>
> *From:* Paul Houghton <Paul.Houghton_at_uis.cam.ac.uk>
> *Sent:* Tuesday, March 19, 2019 11:48 AM
> *To:* Jeff Smith <jeff.d.smith_at_oracle.com>; oracle-l_at_freelists.org
> *Cc:* Sheehan, Jeremy <JEREMY.SHEEHAN_at_fpl.com>; niall.litchfield_at_gmail.com
> *Subject:* RE: SQL Developer line numbers
>
>
>
> Thanks to everyone who replied.
>
>
>
> Jeff Smith said use the compiler log panel. This doesn’t work for me. I
> have a worksheet with some random SQL statements, a package header then the
> package body. The line numbers for errors in the package body are wrong so
> “Go to source” is also wrong. It might be counting from the package
> declaration (at line 31) instead of the package body. If I add in some
> blank lines above the package body and recompile, the line number of the
> error doesn’t change. Maybe it is a bug?
>
>
>
> See http://people.ds.cam.ac.uk/psh35/tmp/sqldev_linenumbers.png
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__people.ds.cam.ac.uk_psh35_tmp_sqldev-5Flinenumbers.png&d=DwMFAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=N2hWu5HFsaIjmMkjQbnlokJ7uinNZMgPVk8rqPT9esM&m=YpiB2GBvRhCL6xTbsbm4v3-alrR3JwqMYQN-jbVVv_Q&s=Fk6-ebwkg1hnixPFV1Ppgehffm9y2PWdko5z6VmGDes&e=>
>
>
>
> Niall Litchfield asked why I didn’t have the package and body in separate
> files. No reason, it just never occurred to me because the package body is
> no use without the definition and vice versa. This would fix the problem
> though, and if it is the normal way to work I should probably follow it.
>
>
>
> Jeremy Sheehan said look at dba_source, which does work, except to fix the
> error I still have to find the line in the source file and correct it
> there. I can click on the object definition and edit that, except I want
> the file in source control. I am experimenting with the git integration and
> quite like it.
>
>
>
> SQL developer Version is:
>
>
>
> Version 18.4.0.376
>
> Build 376.1900
>
>
>
> Database is 12.2.0.1
>
>
>
> Thanks
>
>
>
> PaulH
>

-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 19 2019 - 17:20:06 CET

Original text of this message