Bug 148989 - [65cat] Allow linebreaks, tabs for Find/Replace actions
[65cat] Allow linebreaks, tabs for Find/Replace actions
Status: NEW
Product: editor
Classification: Unclassified
Component: Search
6.x
PC Windows XP
: P4 with 6 votes (vote)
: 7.2
Assigned To: Milutin Kristofic
issues@editor
: PLAN
: 158046 184191 189029 194292 195575 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-02 16:46 UTC by ulfzibis
Modified: 2014-04-01 22:45 UTC (History)
7 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2008-10-02 16:46:20 UTC
[ BUILD # : 200809220201 ]
[ JDK VERSION : 1.6.0_07 ]

Assume, you want find:
"+
    "
, and maybe replace it by nothing,
or find white-spaces or braces at line-end.

These simple actions IMHO should be possible, by marking the search
pattern by mouse, and search by Ctrl-F.

Also the replace string in Replace action should work, if mouse
selected pattern contains tabs or line-ends.

Most other editors have this, e.g. Notepad++.
Comment 1 Andrey Yamkovoy 2009-01-28 14:29:32 UTC
In description you are talking about editor search. So reassign to the editor for evaluation.
As for the "Find In Project" functionality you can find line breaks by using '\r' and '\n' in the regexp. The same for
the replace ...
Comment 2 ulfzibis 2009-01-28 17:49:07 UTC
Yes, the regex way is a kind of workaround here, but ...
1. it must be learned, nothing for beginners, of if you are in a hurry. wildcard's are much more complicated than just
using '*'.
2. I'm more thinking about a cut-'n-paste usage for find AND replace.

What about of transforming the cut string to a valid regex-string on pasting it into the Find/Replace dialogue?
Comment 3 ulfzibis 2010-09-23 11:15:54 UTC
(In reply to comment #2)
> What about of transforming the cut string to a valid regex-string on pasting it
> into the Find/Replace dialogue?

Another interesting idea.
This would slightly teach users in regex over the time, a little!

But please have a look on combined find/replace dialogue of NotePad++, and how they deal with \n \t etc..
This is my favourite from all editors.

I think, we don't need 2 separate dialogues and actions for find and replace, but better availability in any context e.g. bug 187174 148984 146810.
Comment 4 David Strupl 2011-01-13 10:04:55 UTC
*** Bug 194292 has been marked as a duplicate of this bug. ***
Comment 5 David Strupl 2011-01-13 10:05:28 UTC
*** Bug 189029 has been marked as a duplicate of this bug. ***
Comment 6 David Strupl 2011-01-13 10:06:07 UTC
*** Bug 184191 has been marked as a duplicate of this bug. ***
Comment 7 David Strupl 2011-01-13 10:06:51 UTC
*** Bug 158046 has been marked as a duplicate of this bug. ***
Comment 8 malfunction84 2011-02-17 16:10:00 UTC
*** Bug 195575 has been marked as a duplicate of this bug. ***
Comment 9 Milutin Kristofic 2012-01-25 12:34:14 UTC
I will change whole infrastructure for search, which will enable multiline search and regexps.

This is a big change and it doesn't have a high priority now. I hope it will be at least in 7.3.
Comment 10 swpalmer 2014-03-15 03:21:18 UTC
Regexp search/replace is working in NB 8.0 FCS build.  I just used it to match newline characters with \n.  I think this issue can be closed.
Comment 11 markiewb 2014-03-15 08:29:58 UTC
(In reply to swpalmer from comment #10)
> Regexp search/replace is working in NB 8.0 FCS build.  I just used it to
> match newline characters with \n.  I think this issue can be closed.

I do not think so. The request [1] was to paste in text which has linebreaks and which isn't formatted as regex.

[1] https://netbeans.org/bugzilla/show_bug.cgi?id=148989#c0
Comment 12 rhp195 2014-04-01 22:45:18 UTC
I also don't think this should be closed. The functionality needed is to allow the user to select text in the editor and find other occurrences of that selected text at least within the current document.

For me, I want to be able to find duplicate blocks of code in order to identify functionality that can be replaced with more maintainable functions.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo