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

Bug 318192

Summary: Content Assist autocomplete broken with nested anonymous classes and switch
Product: [Eclipse Project] JDT Reporter: Ricket <Ricky28269>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: le7mo27, mario.pierro, mauromol, Olivier_Thomann, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Ricket CLA 2010-06-28 11:24:00 EDT
Build Identifier: 20100617-1415

See the test code under the steps to reproduce; it seems the switch is vital to this bug, as I couldn't take it out and still experience the bug. This bug is similar (possibly related) to bug 249704.

Reproducible: Always

Steps to Reproduce:
1. see the commented lines in the sourcecode and try if autocomplete still
works:

public class Test {
	private Object o = new Object() {
		public void doSomething() {
			int i = 3;
			String s = "Test!";
			
			switch (i) {
			case 3:
				// Autocomplete works here
				new Object() {
					public void run() {
						// Autocomplete works here
					}
				};
				// Autocomplete doesn't work here
				// if you type "s.", it doesn't work
				// if you type "String p = new Str<ctrl+space>", it
				// autocompletes the class name
				break;
			}
		}
	};
}
Comment 1 Remy Suen CLA 2010-06-28 11:40:33 EDT
Could be related to bug 311356 though you need two anonymous classes there.
Comment 2 Ayushman Jain CLA 2010-06-28 11:51:40 EDT
I'll investigate. See also bug 306908
Comment 3 Ayushman Jain CLA 2011-11-15 12:15:47 EST
*** Bug 363786 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Genie CLA 2020-04-18 07:34:31 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.