Bug 267091

Summary: [content assist] After 'implements' interface members are not proposed
Product: [Eclipse Project] JDT Reporter: Rémi Forax <forax>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P4 CC: Olivier_Thomann, srikanth_sankaran
Version: 3.5Flags: Olivier_Thomann: review+
Target Milestone: 3.6 M7   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
proposed fix v1.0 + updated regression tests Olivier_Thomann: iplog+, Olivier_Thomann: review+

Description Rémi Forax CLA 2009-03-04 14:50:32 EST
Build ID: I20090202-1535

Steps To Reproduce:
1. try to trigger content assist after "implements"

class A implements 
                   ^ type ctrl+space here

Content assistant only proposes top-level interface
and not interfaces enclosed in classes.

The dual bug exist too, after "extends", content
assistant doesn't propose class members.

More information:
Comment 1 David Audel CLA 2009-06-29 07:55:35 EDT
Member types are proposed if the completion occurs after at least one character.
When no characters precede the completion cursor then only a subset of possible proposals is proposed. Otherwise the number of proposals will be too high.

In this case only top level types defined in the completed compilation unit are proposed. Member types defined in these top level types could be also proposed.
Comment 2 Srikanth Sankaran CLA 2010-03-31 05:35:59 EDT
Ayush, please take a look.
Comment 3 Ayushman Jain CLA 2010-04-22 09:19:52 EDT
Created attachment 165752 [details]
proposed fix v1.0 + updated regression tests

This may be a little expensive if there are lot of inner types in a compilation unit. Anyway, in the absence of any cue to content assist, we have to take the brute force approach of finding all proposals.

Olivier, can you please review for M7? Thanks
Comment 4 Olivier Thomann CLA 2010-04-22 11:29:45 EDT
Patch looks good, but testing it inside a self-hosting workspace I could not get any completion.
It looks like the completion times out every time.
Ayushman, please take a look at this.
Comment 5 Olivier Thomann CLA 2010-04-22 12:05:27 EDT
Ok, seems to work fine after rebooting.
+1.
Released for 3.6M7.
Regression tests added in:
org.eclipse.jdt.core.tests.model.CompletionTests#testBug267091a
org.eclipse.jdt.core.tests.model.CompletionTests#testBug267091b
Comment 6 Srikanth Sankaran CLA 2010-04-26 04:36:56 EDT
Verified for 3.6M7 using build I20100424-2000.
Raised bug# 310423 as a follow up.