Bug 97085

Summary: (3.1M7) Static import code assist shouldn't propose <package>.*;
Product: [Eclipse Project] JDT Reporter: David Gates <gatesda>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: dirk_baeumer
Version: 3.1   
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description David Gates CLA 2005-05-27 17:10:00 EDT
With J2SE 5.0 compliance enabled, type the following into a new Java file:

import static java.

Code assist will propose all subpackages of java, each followed by ".*;", which 
results in a compile-time error if accepted.

Instead, it should propose plain subpackages ("java.lang" instead of "java.lang.
*;").
Comment 1 David Gates CLA 2005-05-27 17:16:39 EDT
Omission: should do another code assist if a subpackage is selected:

static import java.<code assist>

(selects proposal "java.lang") ->

static import java.lang.<code assist>


Could also show subpackages as "java.lang.".
Comment 2 David Audel CLA 2006-04-21 10:57:18 EDT
*** Bug 108704 has been marked as a duplicate of this bug. ***
Comment 3 Philipe Mulet CLA 2006-04-25 09:13:37 EDT
+1 for 3.2RC2
Comment 4 David Audel CLA 2006-04-25 09:35:10 EDT
Created attachment 39406 [details]
Proposed fix
Comment 5 David Audel CLA 2006-04-25 09:44:30 EDT
Fix released and test added
  CompletionTest_1_5#test0288() -> test0289()

"java.lang." is proposed instead of "java.lang.*;" when the import is static
Comment 6 Olivier Thomann CLA 2006-04-27 22:48:26 EDT
Verified with I20060427-1600 for RC2.