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 68804 - [50cat] concatenated strings
Summary: [50cat] concatenated strings
Status: RESOLVED DUPLICATE of bug 201130
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 5.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-16 13:00 UTC by cbulcu
Modified: 2013-02-08 18:35 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cbulcu 2005-11-16 13:00:37 UTC
[ JDK VERSION : 1.5.0_05 ]

Regarding this issue:
http://www.netbeans.org/issues/show_bug.cgi?id=67775

Roman Strobl wrote:
"I agree. This is very annoying if you write multiline string - e.g. you want to
copy them from another application. Try to convert:

pasted line 1
pasted line 2
pasted line 3

into:

String s = "pasted line 1" +
    "pasted line 2" +
    "pasted line 3";

Each time duplicate quotes are typed in."

I think, and I wrote it in the issue, that this example could lead to a refactoring. Select those three lines and refactor it to the concatenated strings.
Comment 1 Jan Pokorsky 2008-10-16 14:05:51 UTC
It is rather a task for java hints. Reassigning.
Comment 2 cbulcu 2008-10-16 19:01:54 UTC
I remembered about this issue :-)

IntelliJ Idea does an interesting job on inserting those kind of text lines between "".

So if you write in the editor:

""

and then paste

pasted line 1
pasted line 2
pasted line 3

between the "", you get:

"pasted line 1\n" +
"pasted line 2\n" +
"pasted line 3"

so basically it takes the text and surrounds its lines with "", inserts \n after each line before closing the ", and  
concatenates the lines.
Comment 3 markiewb 2013-02-08 18:35:31 UTC

*** This bug has been marked as a duplicate of bug 201130 ***