This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 161031 - Find/Replace for Projects doesn't like newline replaces
Summary: Find/Replace for Projects doesn't like newline replaces
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-24 14:53 UTC by twolf2919
Modified: 2009-03-26 14:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description twolf2919 2009-03-24 14:53:44 UTC
Throughout my project, I was trying to replace occurances of
            .append("\n")
with
            .append('\n')
I tried using Edit->Replace in Project(s) and gave the following find/replace params (I don't have regex checked):
     Find:         .append("\\n")
     Replace with: .append('\n')
But I end up with a file that has a physical line break after the first single quote :-(  If I try to escape the
backslash - e.g. .append('\\n')  - then the file ends up with two backslashes - which is also not what I want :-( 
Escaping backslashes further just compounds the number of backslashes and/or physical line breaks that appear in the file.

What makes the whole matter even more confusing is that the Edit->Replace in Project(s) doesn't work the same way as the
replace within a java file (ctrl-h).  There, I don't have to escape the backslash character in the Find and the
replacement string works as expected also:
     Find:         .append("\n")
     Replace with: .append('\n')

Why the difference?  And why doesn't Replace in Project(s) work with newlines as expected?
Comment 1 Andrey Yamkovoy 2009-03-24 16:34:49 UTC
Fixed in the trunk
Comment 2 Quality Engineering 2009-03-26 14:34:40 UTC
Integrated into 'main-golden', will be available in build *200903260733* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/de7b26931935
User: Andrey Yamkovoy <kaktus@netbeans.org>
Log: Fix for #161031 - Find/Replace for Projects doesn't like newline replaces