Bug 238166

Summary: Content assist return wrong annotation
Product: [Eclipse Project] JDT Reporter: chenell
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: jarthana, martinae, rtaniwa, srikanth_sankaran
Version: 3.4   
Target Milestone: 3.6 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description chenell CLA 2008-06-23 16:02:03 EDT
Build ID: 3.4EC3-2008060616348

Steps To Reproduce:
1.Open a Java file in Java editor
2.at the beginning of the file, enter "@s", then press "Ctrl + space"
3.it will show some annotation starting with "S", but also it will show some package name, like "sun.applet"


More information:
We are using the eclipse extension point
<extension point="org.eclipse.jdt.ui.javaCompletionProposalComputer">
and  org.eclipse.jface.text.contentassist.IContentAssistProcessor
Also, I tried this scenario, it happens from just Eclipse
Comment 1 Robert Taniwa CLA 2009-01-13 13:20:42 EST
Can we get a target for this one? Thanks.
Comment 2 David Audel CLA 2009-06-29 09:42:17 EDT
This is the expected behavior

When a name is completed, possible types and packages are proposed. Types are proposed first in the list of proposals (the relevance of this CompletionProposal is higher) because types are better proposals and packages are valid proposals (eg. @java.lang.annot| // do ctrl+space at |).

If you define your own java completion computer and call ICodeAssist#codeComplete(...), you can force the filtering of packages by using CompletionRequestor#setIgnored(...) (eg. requestor.setIgnored(CompletionProposal.PACKAGE_REF, true))

As it works as expected i close this bug as WONTFIX.

Comment 3 Jay Arthanareeswaran CLA 2009-08-03 04:55:31 EDT
Verified for 3.6M1 using I20090802-2000