Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 405254 - [1.8[code assist] Annotations suggested in super and reference expressions
Summary: [1.8[code assist] Annotations suggested in super and reference expressions
Status: RESOLVED INVALID
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: ANIRBAN CHAKRABORTY CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 402079
  Show dependency tree
 
Reported: 2013-04-09 05:21 EDT by ANIRBAN CHAKRABORTY CLA
Modified: 2013-11-30 19:57 EST (History)
1 user (show)

See Also:
anchakrk: review? (srikanth_sankaran)


Attachments
Patch for the fix (7.14 KB, patch)
2013-07-22 11:51 EDT, ANIRBAN CHAKRABORTY CLA
anchakrk: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ANIRBAN CHAKRABORTY CLA 2013-04-09 05:21:26 EDT
Statements like super.@<ctrl-space> making suggestions, which are giving immediate compilation errors.
Similarly for reference expressions.
Comment 1 ANIRBAN CHAKRABORTY CLA 2013-07-22 11:51:00 EDT
Created attachment 233677 [details]
Patch for the fix

Patch for the fix
Comment 2 Srikanth Sankaran CLA 2013-07-23 01:55:59 EDT
Please see that this breaks completion in the example below:

// ---
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

interface I {
	void foo();
}
public class X {
	static void goo() {
		
	}
	I i = X::<@Mark| String> goo;
}

@Target(ElementType.TYPE_USE)
@interface Marker {
	
}
Comment 3 Srikanth Sankaran CLA 2013-07-23 01:59:35 EDT
(In reply to comment #0)
> Statements like super.@<ctrl-space> making suggestions, which are giving
> immediate compilation errors.
> Similarly for reference expressions.

I am inclined to think we should close this issue as is as INVALID. If the programmer has typed @ in the first place in a location where annotations
cannot legally occur and then attempts to complete it is not unreasonable
to suggest annotations. There is no valid Java construct other than annotations
for which @ is a prefix.

Anirban, if you agree, we can close.
Comment 4 Srikanth Sankaran CLA 2013-07-23 02:03:30 EDT
Resolving per comment#3