Bug 178982

Summary: [assist] Bad static import relevance in content assist
Product: [Eclipse Project] JDT Reporter: Michael Schneider <michschn>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, eric_jodet
Version: 3.3   
Target Milestone: 3.4 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Michael Schneider CLA 2007-03-23 08:15:06 EDT
Build ID: I20070209-1006

Steps To Reproduce:
1. add java.lang.Math to the static imports
2. make sure the content sort by order is set to relevance
3. create a project which imports the JUnit library
4. add the following class:
import junit.framework.TestCase;

public class Foo extends TestCase {
	protected void foo() {
		int selection= 0;
		assertEquals(1, s);
	}
}

observe: when pressing ctrl-space after "s" in the assertEquals(1, s) line to fix the compile error, some static imports from j.l.Math are shown before the local variable "selection"

More information:
Comment 1 David Audel CLA 2008-04-14 05:23:33 EDT
Created attachment 95880 [details]
Proposed fix
Comment 2 David Audel CLA 2008-04-14 05:28:28 EDT
Released for 3.4M7.

Tests added
  CompletionTests_1_5#testFavoriteImports032()
Comment 3 Eric Jodet CLA 2008-04-29 03:03:36 EDT
Verified for 3.4M7 using I20080427-2000.