Summary: | CompletionContext problem with annotation value element | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Karen Butzke <karenfbutzke> | ||||||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | Olivier_Thomann | ||||||||
Version: | 3.5 | Flags: | Olivier_Thomann:
review+
|
||||||||
Target Milestone: | 3.5 RC1 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 274548 | ||||||||||
Attachments: |
|
Created attachment 133976 [details]
CompletionEngine debug for @Convert("")
Created attachment 134427 [details]
Proposed patch
CompletionParser did not attach the completed string literal to the enclosing annotation node.
Olivier, could you review my patch? Patch looks good. Released for 3.5RC1. Tests added GenericsCompletionParserTest#test0219_Diet() -> test0220_Diet() CompletionContextTests_1_5#test0041() -> test0042() Thanks guys, this works great! |
Created attachment 133975 [details] CompletionEngine debug for @Convert(value="") I am working off of 3.5 head and see a problem with CompletionContext.getTokenStart() returning -1 for an annotation value element. Here is an example where our completion assist works inside of the double quotes: @Convert(value="") The problem is when you don't include the value element, which is perfectly valid for annotations: @Convert("") I am attaching docs with the debug info from CompletionEngine.