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 177010 - [69cat] Multiline String; where is the plus
Summary: [69cat] Multiline String; where is the plus
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 183185 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-17 10:13 UTC by stefan79
Modified: 2011-02-08 15:29 UTC (History)
2 users (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 stefan79 2009-11-17 10:13:24 UTC
When you write a String and press return between the quotation marks.
The plus is at the end of the line

String test1 = "line1" +
        "line2" +
        "line3";

After formating the Sourcefile, the plus at the begin of the line:
String test1 = "line1"
        + "line2"
        + "line3";

I think every NB-Version this changes.

Result is, that we´ve many changes at CVS after Source-Code-Formating.

Tested at:
Product Version: NetBeans IDE Dev (Build 200911161401)
Java: 1.6.0_17; Java HotSpot(TM) Client VM 14.3-b01
System: Windows XP version 5.1 running on x86; Cp1252; de_AT (nb)
Comment 1 Marian Mirilovic 2009-11-19 02:28:10 UTC
reproducible in NB 6.8
Comment 2 Jiri Prox 2009-11-19 03:07:19 UTC
This is result of fixing bug 151154, making code formatter to follow recommended formatting. 

The split string action should probably follow this formatting as well and/or this may be configurable
Comment 3 stefan79 2010-04-28 10:49:17 UTC
Bug is still alive at Current 6.9-build.

I don´t need a option (-> #177873), but the program should always give me the same result (wherever the plus then stands).
Comment 4 stefan79 2010-05-05 14:59:31 UTC
Please fix this.
Comment 5 Dusan Balek 2010-05-07 16:32:34 UTC
Fixed in jet-main (including an option).

 http://hg.netbeans.org/jet-main/rev/9ed7c3a690ae
Comment 6 Quality Engineering 2010-05-10 09:25:11 UTC
Integrated into 'main-golden', will be available in build *201005100200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log:
Comment 7 stefan79 2010-05-11 11:45:44 UTC
Works fine.
Thanks!
Comment 8 Dusan Balek 2010-11-01 14:32:12 UTC
*** Bug 183185 has been marked as a duplicate of this bug. ***
Comment 9 DandyDanD 2011-02-04 07:18:50 UTC
This bug is reproducible always in NetBeans IDE 7.0 Beta (Build 201011152355).

When you write a String and press return between the quotation marks.
The plus is at the end of the line

String test1 = "line1" +
        "line2" +
        "line3";

After formating the Sourcefile, the plus at the begin of the line:
String test1 = "line1"
        + "line2"
        + "line3";

This is equally applicable to boolean expressions:

if (getA() ||
    getB())

becomes

if (getA()
    || getB())
Comment 10 Dusan Balek 2011-02-08 15:29:08 UTC
Works fine in the current dev build. Please note the "Wrap After Binary Operators" formatting option.