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

Bug 570246

Summary: [16] declaration search for an Enum doesn't search the local Enum
Product: [Eclipse Project] JDT Reporter: Vikas Chandra <Vikas.Chandra>
Component: CoreAssignee: Vikas Chandra <Vikas.Chandra>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 4.19   
Target Milestone: BETA J16   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/175306
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=a46a00e28c713e610763d1202abc56414b233914
Whiteboard:

Description Vikas Chandra CLA 2021-01-11 07:16:09 EST
public class X2__ { 
	public static void main(String[] args) {
     enum Y1 { 
		
		BLEU,
		BLANC,
		ROUGE;
		
		public static void main(String[] args) {
			for(Y1 y: Y1.values()) {
				System.out.print(y);
			}
		}
		
	  }
	  Y1.main(args);
	}
}

Search for Type Y1 and limit to declarations. 

   enum Y1 { 

is not searched.

Even when all references are search, this is not searched.
Comment 1 Vikas Chandra CLA 2021-01-13 06:27:50 EST
Control+Shift G on Y1 says operation unavailable.
Comment 2 Vikas Chandra CLA 2021-01-25 01:22:04 EST
Fixed in  Y20210123-0110 ( probably because of Bug 570248)

but probably needs a test case for this ( as well as local interface). Via this bug, I will provide the test case
Comment 3 Eclipse Genie CLA 2021-01-25 04:44:05 EST
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/175306