Summary: | [assist] Unexpected types are proposed inside catch block | ||||||
---|---|---|---|---|---|---|---|
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: | victor.toni | ||||
Version: | 3.3 | ||||||
Target Milestone: | 3.3 M6 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
David Audel
2007-02-13 09:31:56 EST
This problem is caused by the fact that we use a list of type names to compute proposals and compute type hierarchies would be too costly. The general case would be hard to fix but perhaps the case of the empty token could be improved. Created attachment 59058 [details]
Proposed fix for the empty token case
When the completion occurs on an empty token it's possible to not propose types which are not exception. This is possible because when the token is empty only a small subset of types are proposed and we have access to resolved informations about these types (bindings). When the completion token isn't empty we use searchAllTypeName API to find types name because it would be too costly to compute all the resolved informations. So we only have access to type names and don't have access to the types hierarchy. I will fix the empty token case and will enter a new bug to keep trace of the non empty case. Released for 3.3M6 Tests updated CompletionTests#testCatchClauseExceptionRef08 CompletionTests#testCompletionMemberType2 Only the empty token case is fixed. I entered bug 174312 for the not fixed part of the problem Verified for 3.3 M6 using build I20070319-1335. Since the limitations of the implemented solution are documented and the fup bug 174312 should take care of the additional work that is still needed, I consider that the situation has improved in the realm of the initial test case and that this bug is verified. Opened bug 178218 for a different problem detected during the verification. |