Bug 97085 - (3.1M7) Static import code assist shouldn't propose <package>.*;
Summary: (3.1M7) Static import code assist shouldn't propose <package>.*;
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 108704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-27 17:10 EDT by David Gates CLA
Modified: 2006-04-27 22:48 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (5.80 KB, patch)
2006-04-25 09:35 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 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.