Forum Stats

  • 3,837,237 Users
  • 2,262,240 Discussions
  • 7,900,230 Comments

Discussions

Search tool in 22.2

A. Olsen
A. Olsen Member Posts: 30 Blue Ribbon

My search in SQL-Worksheet editor seems to be stuck, and searches only from cursor (i.e. where the mouse has had it's focus; not from a "cursor c1 is..." statement)

If I focus, say, on line 224 of the code file, and search for a word, then jump to the top of the file and hit F3, the next highlighted word would be the one on or later than line 224, even though the same word exists on line 118, for instance.

What am I missing? There must be some search option that I have not figured out :)

A. In this example, I place the mouse in the middle of the word varchar2 on line 5 and hit Ctrl+F

varchar2 is the search string, but 0 of 0 are found.

B. In this example, I've placed the mouse cursor at the very end of line 4, hit Ctrl+F and typed "varchar2"

I then escape, go the the top of the editor and hit F3:

Lines 3 and 4 are skipped.

Answers

  • Jim Smith
    Jim Smith Member Posts: 2,876 Silver Trophy

    I've just tried this and it behaves as I would expect.

    As you type varchar2, it highlights all the instances of varchar2. After going to the beginning of the file, F3 finds the first instance.


    Looks like there is something wrong with your installation. Are any messages appearing in the log window?

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,687 Employee

    you don't have the wrap-around button toggled on

  • A. Olsen
    A. Olsen Member Posts: 30 Blue Ribbon

    Ah, thanks. I thought I was missing something.

    Although I thought that wrap around only meant: "When reaching the bottom of the file, continue from the top". That's why I didn't think it was vital for searching back.


    BTW wouldn't it be cool, if the search tool would allow to limit search to a specific context, such as within a certain procedure, or between lines , for instance [214 and 518]?

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,687 Employee

    It does

    select/highlight your search area, then toggle the 'Selected Text Only' button

  • A. Olsen
    A. Olsen Member Posts: 30 Blue Ribbon

    In many cases, it is difficult to keep a large number of rows selected. For instance, if you have to make some changes to a large package body, you search for some string, then F3 is very useful. You study the code that you find, make some changes or leave it as it is, and use F3 to go to the next one. In such case, the searched context does not remain selected, and F3 will run to, say, line 14556 where the change is not relevant. The changes to be made are not necessarily the same "replace" value.

    I wish, all the procedures I have to change would "fit on one screen", as the recommendation often is - but alas, they are seldom this short :-)

  • user9540031
    user9540031 Member Posts: 222 Gold Badge

    In many cases, it is difficult to keep a large number of rows selected.

    If that may help, 2 comments from former questions about the Search tool: here and here.

    Regards,

    A. Olsen
  • A. Olsen
    A. Olsen Member Posts: 30 Blue Ribbon

    user9540031 thanks, these tips are helpful.

    But the "big catch" described is the reason I ask.

    In good old MVS editor (that's IBM Mainframe; ancient history to most people) with line numbers on the left side, you could enter 2 markers and thus search between them. I'd say they were a lot like Breakpoints in terms of debug, or named bookmarks. Now if we could place a couple of names bookmarks and limit search to between the two, that would solve the big catch :-)

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,687 Employee

    We're not going to be doing significant feature improvements in the current SQL Developer.

    What you'll see instead (soon), is a brand new desktop platform for working with your Oracle Database. And it'll have ALL the modern editor/IDE bells & whistles.

    A. Olsen