Bug 47401 - Wrong code assist proposals in anonymous class
Summary: Wrong code assist proposals in anonymous class
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-25 06:38 EST by Martin Aeschlimann CLA
Modified: 2003-12-16 11:32 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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