Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 377445

Summary: [content assist] Code complete is vague when multiple Options exist for Enum member type on annotation
Product: [Eclipse Project] JDT Reporter: Cody Lerum <cody.lerum>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7.2   
Target Milestone: 3.8 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screenshot of the autocomplete none

Description Cody Lerum CLA 2012-04-23 16:18:31 EDT
Build Identifier: 

Assuming JPA annotation javax.persistence.OneToMany

If defining the cascade member on the annotation and the CascadeType is not already imported I am presented with 3 different CascadeType which provide no detail as to which is which.

javax.persistence.CascadeType
org.hibernate.annotations.CascadeType
org.hibernate.metamodel.binding.CascadeType

I think the package name should be provided so that you can see which option you want to select and or limit to javax.persistence.CascadeType which is the only acceptable type for member cascade on javax.persistence.OneToMany

Reproducible: Always

Steps to Reproduce:
1. Add Annotation
2. Add member
3. See complete options
Comment 1 Cody Lerum CLA 2012-04-23 16:19:50 EDT
Created attachment 214419 [details]
Screenshot of the autocomplete

Note how it is not possible to know which is the desired javax.persistence.CascadeType from either the code complete suggestion or the info  popup
Comment 2 Dani Megert CLA 2012-04-24 06:03:58 EDT
Cody, if you use content assist directly after the "=", it will only show the matching values.

Fixed the label in master: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=f443721539831e6a3a74a950c180eae63df24bf5