Hi,
I've been thinking for a while that there must be an easy way to do this. Let me first describe what "this" is.
In our application install scripts we have several lines of mod history above the "CREATE OR REPLACE PACKAGE BODY" line.
When we get an error in the application, the line number given for the error in the package starts counting at "1" for this line - naturally, as the preceding lines are not in the database, it cannot possibly know the "file line number" to give in the error. Bearing in mind that often the error we're given is from a customer reporting a message or from diagnostics gathered on the customer's system and emailed to us - we're not presented in plsdev with the simple "take me to that error" pop-up.
To account for this, I place the cursor at the "CREATE OR REPLACE ..." line and do a "Control+G" (Edit / Navigation / Go to a specific line number). This then gives me the current line number to which I add in my head the line number given in the error, and subtract 1. Having done that, I type the answer in and get taken to that line number. Often I then end up doubting my own arithmetic, but that's another story
.
It's perfectly possible, of course, that I've just not spotted something - but I have had a good play around and have been hunting for an answer to this for some time - and I've got the latest version - 12.0.5.1828.
So I wondered whether one or more of the following might assist:
1) Could the Control+g dialogue accept, for example, "+1234" as an input and navigate to the line 1,234 below the current position?
Or an expression: e.g. "432+1234" if we recall that the package starts on file line 432?
2) Could the Command Window / Program Window recognise a specific line as "hereafter, there be code". For example:
... thus treating "-- StartOfProgramUnit" as "line zero" for control+g purposes?
"-- StartOfProgramUnit" might also be handy to default as a bookmark.
NB: The command window would no doubt only recognise the first of these, whereas a program window would recognise each of these for line counting in each tab
NNB: -- or REM or ... is required so that the line is skipped by SQL*Plus
NNB: It would be fab if the program window treated the lines above this as a Command Window style (with REM... comments)
3) Provide a way to automatically repeat a keypress or run a macro up to 'x' times. e.g. Shift-F11 pops up a dialogue to enter the desired repeat count for the macro.
4) Something else I haven't thought of, but might be similar to what other editors might do.
Votes / comments / alternatives - even something which works! - are most welcome.
Thank you,
Tim
I've been thinking for a while that there must be an easy way to do this. Let me first describe what "this" is.
In our application install scripts we have several lines of mod history above the "CREATE OR REPLACE PACKAGE BODY" line.
When we get an error in the application, the line number given for the error in the package starts counting at "1" for this line - naturally, as the preceding lines are not in the database, it cannot possibly know the "file line number" to give in the error. Bearing in mind that often the error we're given is from a customer reporting a message or from diagnostics gathered on the customer's system and emailed to us - we're not presented in plsdev with the simple "take me to that error" pop-up.
To account for this, I place the cursor at the "CREATE OR REPLACE ..." line and do a "Control+G" (Edit / Navigation / Go to a specific line number). This then gives me the current line number to which I add in my head the line number given in the error, and subtract 1. Having done that, I type the answer in and get taken to that line number. Often I then end up doubting my own arithmetic, but that's another story

It's perfectly possible, of course, that I've just not spotted something - but I have had a good play around and have been hunting for an answer to this for some time - and I've got the latest version - 12.0.5.1828.
So I wondered whether one or more of the following might assist:
1) Could the Control+g dialogue accept, for example, "+1234" as an input and navigate to the line 1,234 below the current position?
Or an expression: e.g. "432+1234" if we recall that the package starts on file line 432?
2) Could the Command Window / Program Window recognise a specific line as "hereafter, there be code". For example:
Code:
-- StartOfProgramUnit
CREATE ORE REPLACE PACKAGE BODY foo
IS
...
... thus treating "-- StartOfProgramUnit" as "line zero" for control+g purposes?
"-- StartOfProgramUnit" might also be handy to default as a bookmark.
NB: The command window would no doubt only recognise the first of these, whereas a program window would recognise each of these for line counting in each tab
NNB: -- or REM or ... is required so that the line is skipped by SQL*Plus
NNB: It would be fab if the program window treated the lines above this as a Command Window style (with REM... comments)
3) Provide a way to automatically repeat a keypress or run a macro up to 'x' times. e.g. Shift-F11 pops up a dialogue to enter the desired repeat count for the macro.
4) Something else I haven't thought of, but might be similar to what other editors might do.
Votes / comments / alternatives - even something which works! - are most welcome.
Thank you,
Tim