Bug 267091 - [content assist] After 'implements' interface members are not proposed
Summary: [content assist] After 'implements' interface members are not proposed
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P4 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-04 14:50 EST by Rémi Forax CLA
Modified: 2010-04-26 04:36 EDT (History)
2 users (show)

See Also:
Olivier_Thomann: review+


Attachments
proposed fix v1.0 + updated regression tests (4.25 KB, patch)
2010-04-22 09:19 EDT, Ayushman Jain CLA
Olivier_Thomann: iplog+
Olivier_Thomann: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.