Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342405

Summary: Wrong cachinf of IntelligentCompletionContext
Product: z_Archived Reporter: Johannes Lerch <lerch>
Component: RecommendersAssignee: Marcel Bruch <marcel.bruch>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.