Bug 178982 - [assist] Bad static import relevance in content assist
Summary: [assist] Bad static import relevance in content assist
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-23 08:15 EDT by Michael Schneider CLA
Modified: 2008-04-29 03:03 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix (6.65 KB, patch)
2008-04-14 05:23 EDT, David Audel CLA
no flags Details | Diff

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