Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 488244

Summary: Inserting { inside of a constructor string argument causes cursor to move to end of line
Product: [Eclipse Project] JDT Reporter: Gray Watson <gray.eclipse>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: laville, stephan.herrmann
Version: 4.5.1   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard: stalebug

Description Gray Watson CLA 2016-02-22 11:50:38 EST
When I have a constructor (not a method call) that takes a String (or String[]) that contains "{", Eclipse gets confused when I insert another "{" in to the string.

   // position the cursor, inside of the "" and try to insert another {
   new String("");

Trying to insert a { inside of the "" causes the cursor to move to the end of the line but then it is very confused about the cursor position.  Deleting the new { returns the cursor inside the constructor string argument.
Comment 1 Gray Watson CLA 2016-02-22 11:54:41 EST
Aha.  This only happens if you have "Automatically insert at correct position... Braces" checked off.
Comment 2 Eclipse Genie CLA 2019-07-05 05:28:15 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.