Forum Stats

  • 3,769,505 Users
  • 2,252,970 Discussions
  • 7,875,061 Comments

Discussions

restore or enhance the search functionality in editor

user7091240
user7091240 Member Posts: 36 Green Ribbon

Its search functionality is too weak:

And the replace text box can not be undone.

Not many years ago, it provider much richer features:


and the replace:


I am wondering if oracle sql developer's developer use this tool in their daily life?

If so, are they happy with this weak, better than nothing search/replace new design?

From what kind of view, this weakening design got approved as improvment?

Comments

  • Mike Kutz
    Mike Kutz Member Posts: 5,813 Silver Crown

    Did you try enabling Regular Expressions by clicking the .* button?


  • user7091240
    user7091240 Member Posts: 36 Green Ribbon

    That will enable it to interpret the typed string as regular expression, nothing more than that.

  • Mike Kutz
    Mike Kutz Member Posts: 5,813 Silver Crown

    According to what you posted, I thought that was the feature you wanted.

    I feel that the developers kept the most used options (like Regular Expressions searching) and simplified the interface around that.


    What search&replace feature are you missing in the new interface?

    thatJeffSmith-Oracle
  • user9540031
    user9540031 Member Posts: 129 Silver Badge

    Hi,

    @user7091240

    Not many years ago [...]

    Is this a joke? IIRC, that GUI change dates as far back as release 4.1.5—which I downloaded in nov. 2016... And the old screenshots above—directly borrowed from an older post on ThatJeffSmith.com, BTW (*)—are a trip down memory lane, really!

    (*) https://www.thatjeffsmith.com/archive/2013/08/oracle-sql-developer-4-quick-hit-search-and-replace/

    That said, I remember the same feeling of loss (and being a bit shocked about it) when I first saw it, but that bad feeling did not last long. After using it for a short time, I realized it was just the same, albeit in a lighter and actually more convenient GUI: just hover the mouse pointer over each button long enough for the tooltip to appear, and you'll see that everything is there.

    And the replace text box can not be undone.

    Of course it can! Just toggle the Replace button again (on the right of the Search toolbar) and the Replace bar will go away.

    Similarly, click on the small x symbol on the far right of the Search toolbar and the whole Search/Replace toolbar will close.

    But frankly, complaining loudly 5 years after the fact, when everyone else has been using that feature for so long noone can remember when it was first released...

    My two cents,

    Regards,

  • user7091240
    user7091240 Member Posts: 36 Green Ribbon

    Thanks for the trick.

    Is there anything to setup to let search only in one unit (procedure, function) and in the code or comment?

  • user9540031
    user9540031 Member Posts: 129 Silver Badge

    Hi,

    Is there anything to setup to let search only in one unit (procedure, function) and in the code or comment?

    AFAIK, there's no direct option to limit the search to a specific code unit, however you may restrict it to a text selection of your choice, by using the Selected Text Only button.

    First select the search area, then single-click on the Selected Text Only button in order to enable it—or double-click on it if you want to reset the search area. Subsequently the search will be limited to that area.

    If you need to search inside a specific program unit, you would combine this with the other features of the PL/SQL code editor:

    • The [-] sign in the left margin, which enables to fold an entire scope: use it to fold an entire code unit; this makes it easy to select the folded unit entirely (it will unfold automatically to display search results)
    • The Code Outline feature (right-click inside the code editor, then Code Outline), which shows your position in the code structure, and may be used as a navigation map into the code (remark: it's not sorted alphabetically, as it reflects the structure of the code: if the code is messy so will be the map).
    • Breadcrumbs, displayed on the bottom of the code editor, also provide with your position in the code, and enable to jump up to the beginning of any of the shown enclosing scopes. (Make sure you have enabled them in Tools -> Preferences..., Code Editor tab, Show Breadcrumbs checkbox.)

    Unfortunately, there's no way to turn off/on searching inside comments—too bad if you have to analyze hairy code in which lazy fellows have left whole spans of dead code in commented-out sections, resulting in plenty of noise in searches 😕

    And there's a big catch: the selected text search area can be lost extremely easily if you make a new text selection and go to the Search bar again with that new text still selected—e.g. double-click onto an identifier, then just press Ctrl+F, expecting to simply change the searched-for pattern to that identifier while keeping the same, previously-selected, text search area. That does not work with the Selected Text Only button enabled: instead, the text search area is reset to the new selection, resulting in just searching for xxx inside a text span which only contains xxx 😣. That the selected search area may be lost so easily is obviously something to be improved, IMHO. But please note that, actually, making text selections does not change the text search area. What does it is going directly to the Search bar while the new selection is on. Hence, Select -> Ctrl+F does not work; select -> Ctrl+C, Ctrl+V into the search input field does not work either; but Select, Ctrl+C, Unselect, then Ctrl+V into the search input field does—it takes getting used to.

    Hope this helps!

    Regards,

  • user7091240
    user7091240 Member Posts: 36 Green Ribbon

    Thank you so much for the very helpful information in such detail.

    Nothing is perfect, but we can push and pursue and get closer to the goal, by sharing with a hope and digging around with what is given. :)😐️