Bug 238166 - Content assist return wrong annotation
Summary: Content assist return wrong annotation
Status: VERIFIED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.6 M1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 16:02 EDT by chenell CLA
Modified: 2009-08-04 05:49 EDT (History)
4 users (show)

See Also:


Attachments

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