Summary: | [5.0][content assist] Content assist show all members of a full annotation | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Antonel Ernest Pazargic <antonel.pazargic> | ||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | enhancement | ||||||
Priority: | P3 | CC: | daniel_megert, david_audel, eclipse, jan.materne, wolfgang.knauf | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.3 M2 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Antonel Ernest Pazargic
2006-06-24 04:17:58 EDT
Currently if you want to complete an annotation member name you need to type at least the first character. If the first character isn't typed you have this kind of code: @Annotation(| // do ctrl+space at | location In this case this is not an annotation member completion but JDT/Core complete the annotation itself. This behavior is like the completion of a method invocation 'foo(|)' but currently this don't work correctly (see bug 126364). If the annotation declaration would be shown with a little hover as for method invocation, i think the problem would be solved. Move to JDT/Text for comment. Tom, please comment. Re. comment 1: It is true that the completion works similar to the methods, however, I think the annotation case should be handled differently for these reasons: - An unfinished method call may be ambiguous for overloaded methods, however, there is no such thing as an overloaded annotation since annotations take named arguments. For methods, we typically let the user choose which overloaded method for which he wants to fill in the argument list. This is not needed for annotations. - Named annotation arguments have a finite range: the annotation member names. The same does not exist for method calls. For that reason, it is possible to provide zero-prefix proposals in this case. This is not possible for methods (without argument guessing). So, I think core should behave differently for annotations than for method calls, and provide proposals for the annotation's members even if there is no prefix. This can be compared to switch-over-enum, where core provides zero-prefix proposals for case labels. I would like to move this enhancement request back to jdt-core - David, do you disagree? - Note: providing parameter hints inside annotations as you suggested would still be a good idea. I filed bug 148948 to track this on our side. *** Bug 126364 has been marked as a duplicate of this bug. *** Your arguments convince me and i don't see any reason to not do what you suggest, so i take the bug and i will implement the behavior. Note : The asked behavior is the behavior that we had before the fix for bug 94111. Oh yes, please add this feature ! In EJB3 development 50% of the difficult stuff is done by annotations, and for a beginner like me it would be very helpful to see all possible values of an annotation. I would love to see this in the next maintenance release because I will have to do some EJB3 work the next time. Created attachment 49385 [details]
Proposed fix
Released for 3.3 M2 Tests added CompletionTests_1_5#test0196() -> test0201b() Now arguments names are proposed even if there is no prefix. Verified for 3.3 M2 using build I20060918-0010 |