Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342405 - Wrong cachinf of IntelligentCompletionContext
Summary: Wrong cachinf of IntelligentCompletionContext
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Recommenders (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Marcel Bruch CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 04:05 EDT by Johannes Lerch CLA
Modified: 2019-07-24 14:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Lerch CLA 2011-04-11 04:05:18 EDT
IntelligentCompletionContextResolver caches IntelligentCompletionContext if the instance of JavaContentAssistInvocationContext is equal to the previous instance. But, the implementation of equals only checks the viewer, cursor offset and the document. It is possible that all of these are equal, even if completion is triggered on different variables and types what results in proposals for the cached type which can be wrong. 
This case is very unlikely as the cursor position must be the same for different scenarios.
Comment 1 Marcel Bruch CLA 2012-01-12 04:26:08 EST
This issue may happen on 3.7. For 3.8 and 4.2 the JDT APIs have changed so that it's unlikely that this issue happens again. Marking as won't fix. Reopen if necessary.