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

Bug 29379

Summary: [typing] Auto-inserted bracket '}' crosses parentheses scope
Product: [Eclipse Project] JDT Reporter: Nikolay Entin <nick.entin>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, eclipse.org
Version: 2.1   
Target Milestone: 3.5 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Nikolay Entin CLA 2003-01-13 08:46:00 EST
Suppose there is a method
void foo (String []);

if in some place you want ivoke the method creating the array on fly, and 
suppose to type something like:
foo (new String [] {"x"})

automatic parentheses and curved brackets insertion makes your code looking as
foo (new String [] {<cursor here>)
}
i.e closing curved bracket goes out of the method parameter parentheses...
Comment 1 Dani Megert CLA 2008-06-18 05:26:05 EDT
*** Bug 237466 has been marked as a duplicate of this bug. ***
Comment 2 Dani Megert CLA 2008-09-15 11:57:24 EDT
Bug is in JavaAutoIndentStrategy.computeAnonymousPosition(IDocument, int, String, int).
Comment 3 Dani Megert CLA 2008-09-22 12:10:38 EDT
Fixed in HEAD.
Available in builds > N20080922-2000.