Bug 87565

Summary: [1.5][annot] Code assist doesn't work for initializer of annotation members
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ccm682, eric_jodet, Michal.Tkacz, youngm
Version: 3.1   
Target Milestone: 3.4 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2005-03-09 16:18:27 EST
Using latest, try to use code assist at the different locations:

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(value=RetentionPolicy.SOURCE)
@Target({<code assist here> El<code assist here>ementType.TYPE,
ElementType.PACKAGE})
public @interface Annot {
	int id();
	Class c() default Object.class;
}

Also when you have:
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(value=RetentionPolicy.SOURCE)
@Target(<code assist here>)
public @interface Annot {
	int id();
	Class c() default Object.class;
}

give only value, then after adding a '=', there is no more completions.

I would expect to be able to code assist on type names inside a member pair value.
Comment 1 Frederic Fusier CLA 2005-08-02 05:04:14 EDT
*** Bug 105689 has been marked as a duplicate of this bug. ***
Comment 2 Mike Youngstrom CLA 2006-09-06 17:42:37 EDT
I'm just voting for this issue running into similar problem of content assist not working when doing something like:

@Target({ElementType.PARAMETER, ElementType.FIELD})

Content assis works fine when completing ElementType.PARAMETER but no more content assist after the comma for ElementType.FIELD.

Mike
Comment 3 David Audel CLA 2008-04-10 07:25:11 EDT
I do not reproduce the problem with build I20080409-1425.
The problem is fixed in a previous build.

I close this bug as WORKSFORME.
Comment 4 Eric Jodet CLA 2008-04-28 07:31:41 EDT
Verified for 3.4 M7 - this issue was fixed in a previous build.