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 118400 - Pressing enter inside a string puts cursor at start of new line instead of inside string on new line
Summary: Pressing enter inside a string puts cursor at start of new line instead of in...
Status: RESOLVED DUPLICATE of bug 112241
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker (vote)
Assignee: issues@ide
URL: http://roundpegsinsquareholes.com/fil...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-10 16:14 UTC by mmelin
Modified: 2007-10-11 10:47 UTC (History)
0 users

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 mmelin 2007-10-10 16:14:26 UTC
Hopefully the summary is clear, I have also included a screenshot from Netbeans 6.0 Beta 1 on Mac OS X in this issue's URL to illustrate the issue.

In Netbeans 5.5, pressing enter while inside a string in Java classes causes the editor to close the string, append the '+' character, jump to a new line and 
start a new string indented properly, placing the cursor at the beginning of the new string.
Like this:
String test = "A very long string which needs to be split into" + 
                    "[CURSOR]

But in Netbeans 6.0 Beta 1, this happens:
String test = "A very long string which needs to be split into" + 
[CURSOR]      "" +

Which is not nearly as useful, and I cannot imagine this being a design decision.

Steps to reproduce:
1. Create a new Java Class in Netbeans 6.0 Beta 1
2. In a method, assign a String to a value enclosed in quotation marks ""
3. Press enter while inside the quotation marks

Observed on:
Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709141330)
Java: 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87
System: Mac OS X version 10.4.10 running on ppc; MacRoman; en_US (nb)
Comment 1 Jiri Prox 2007-10-11 10:47:07 UTC
This is already filed as issue 112241, thanks for your report anyway

*** This issue has been marked as a duplicate of 112241 ***