Bug 47401

Summary: Wrong code assist proposals in anonymous class
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2003-11-25 06:38:04 EST
M5

1. 	public void runTest() {

		Thread t= new Thread() {
                        | code assist here 
			public void run() {
			}
		};
		t.start();
	}

Code assist at the given method suggests to override 'Thread.activeCount()'

Anonymous methods can not have static methods.
It's also questionable if static methods should be offered to override anyway.
Comment 1 David Audel CLA 2003-11-26 12:11:51 EST
CodeAssist should not suggest static methods for anonymous, local and non 
static member types.

In other case, static method should be suggested but with a lesser relevance 
than non static methods.
Comment 2 David Audel CLA 2003-11-27 06:34:56 EST
Fixed and tests added (CompletionTests#testCompletionStaticMethodDeclarationX)
Comment 3 Frederic Fusier CLA 2003-12-16 11:32:22 EST
Verified with build I200312160010