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

Bug 94245

Summary: [typing] Auto-close quotes is not working after return
Product: [Eclipse Project] JDT Reporter: David Saff <david>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: bhunt, markus.kell.r
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description David Saff CLA 2005-05-10 05:18:33 EDT
I think this may have something to do with my American keyboard on a machine
somehow set up to expect Swiss input.  But I may be wrong.

On build I20050509-2010, with preference enabled for Java > Editior > Typing >
Automatically close > "Strings"

Incomplete code:
>>>
public class Card {
	public Object getGermanSide() {
		foo(
		a = 
		return 
	}
}
<<< 

1) Position cursor after foo(, and type ".  
Result: foo(""

1) Position cursor after a = , and type ".  
Result: a = ""

1) Position cursor after return , and type ".  
Result: return "

Note that the quotes in the return statement are not automatically closed.
Comment 1 Tom Hofmann CLA 2005-05-11 04:19:52 EDT
Been like this forever - we use heuristics in CUEditor.BracketInserter trying to
detect in which cases not to insert the closing peer. One of the heuristics to
check whether there is an identifier to the left.

Return statements are a valid case where autoclosing should work.
Comment 2 Tom Hofmann CLA 2005-05-18 05:14:34 EDT
*** Bug 95698 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2019-09-13 11:58:08 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.