Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 405240 - [1.8][code assist] Annotations suggestions are mostly, if not fully, oblivious to context
Summary: [1.8][code assist] Annotations suggestions are mostly, if not fully, obliviou...
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 402079
  Show dependency tree
 
Reported: 2013-04-09 04:04 EDT by ANIRBAN CHAKRABORTY CLA
Modified: 2013-11-30 19:57 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ANIRBAN CHAKRABORTY CLA 2013-04-09 04:04:31 EDT
Just pasting one or two representative testcases:

Testcase 1.

//Readonly.java
import java.lang.annotation.*;

@Target ({ElementType.METHOD})
public @interface Readonly {

}



//X1.java

import java.util.*;


public class X1 {
	List<@Reado<ctrl-space> String> s;  // =>> @Readonly is suggested here

}


================================================

Testcase 2.

//Readonly.java
import java.lang.annotation.*;

@Target ({ElementType.PACKAGE})
public @interface Readonly {

}


//X1.java
import java.util.*;


public class X1 {
	@Re<ctrl-space>  // =>> @Readonly is suggested

}


Thanks
Anirban
Comment 1 Srikanth Sankaran CLA 2013-09-28 21:40:55 EDT
I don't think this can be fixed easily. This is just a variant of a well known
problem: Code completion to a good extent depends upon search engine fed 
information which unresolved in nature. 

Another point is that in many case we supply what could be prima facie 
inappropriate proposal, but the error could be corrected by a quick fix.