Summary: | [assist] UnsupportedOperationException even when the context is extended | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | David Audel <david_audel> | ||||||
Component: | Core | Assignee: | David Audel <david_audel> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | jerome_lanneluc, maxime_daniel | ||||||
Version: | 3.4 | Flags: | maxime_daniel:
review+
|
||||||
Target Milestone: | 3.4 RC1 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
David Audel
2008-05-13 04:09:41 EDT
Created attachment 99899 [details]
Proposed fix
When there is no proposal or when there is a problem during completion then a minimal completion context is returned. If the completion requestor ask an extended context then this minimal context must be an extended context.
Maxime - Could you review my patch ? Question: is there any chance, at the semantic level, that a CompletionContext ever needs to revert from extended to non-extended? I would bet not, in which case I'd prefer a no-parameter setExtended() method over the one you propose. It may make sense performance-wise to inline isExtended within CompletionContext (the public method still being part of the API, for use by other callers). Other than that, looks good. Created attachment 99908 [details]
Updated patch
This patch include the previous patch with modifications suggested by Maxime.
This patch:
- Inline isExtended()
- Replace setExtended(boolean) by setExtended()
OK for me. Released for 3.4RC1. Test added CompletionContextTests#test0165() Verified for 3.4RC1 using org.eclipse.jdt.core v_863 |