Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331881 - [content assist] Option to add ".class" qualifier when auto-completing Class<?> annotated attribute
Summary: [content assist] Option to add ".class" qualifier when auto-completing Class<...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT Core Triaged CLA
QA Contact: Ayushman Jain CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-05 21:35 EST by Paul Benedict CLA
Modified: 2010-12-06 10:25 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Benedict CLA 2010-12-05 21:35:22 EST
Build Identifier: 

If an annotation's attribute is a Class<?> type, and I use auto-complete to select a class, the ".class" qualifier does not appear. So, it's extra clicks to add the dot and then the qualifier. This shouldn't be necessary. Granted, Eclipse can't divine how I am going to get the class object, but my pattern is pretty typical (especially with JPA!). How about a new option that adds ".class" if auto-completing a Class<?> annotation attribute? 

(PS: Can this enhancement apply to method parameters too?)

Reproducible: Always

Steps to Reproduce:
Select the class from auto-complete.
Comment 1 Dani Megert CLA 2010-12-06 04:36:01 EST
>If an annotation's attribute is a Class<?> type, and I use auto-complete to
>select a class, the ".class" 
You can type a '.' to make the proposal pop-up open again which suggests '.class', right?
Comment 2 Paul Benedict CLA 2010-12-06 09:45:33 EST
> You can type a '.' to make the proposal pop-up open again which suggests
> '.class', right?

Of course. Just to be clear, this ticket is to save the extra two clicks. It's really not necessary when I am choosing a class for a Class<?> type.
Comment 3 Dani Megert CLA 2010-12-06 09:58:15 EST
(In reply to comment #2)
> > You can type a '.' to make the proposal pop-up open again which suggests
> > '.class', right?
> 
> Of course. Just to be clear, this ticket is to save the extra two clicks. It's
> really not necessary when I am choosing a class for a Class<?> type.
OK, just wanted to make sure.

Automatically adding ".class" when the user selects the type is not something I want to add an option for. What I could imagine is that JDT Core detects this scenario and then proposes both, the type and the class object.