Bug 330842 - [content assist] Content assist misses members
Summary: [content assist] Content assist misses members
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 14:00 EST by Johannes Rieken CLA
Modified: 2011-02-02 03:36 EST (History)
3 users (show)

See Also:


Attachments
Sample code (2.33 KB, application/zip)
2010-11-22 14:00 EST, Johannes Rieken CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Rieken CLA 2010-11-22 14:00:31 EST
Build Identifier: 3.7m3

See attached CUs. Open Main and invoke content assist for IPlanningDefinitionDescriptor. It only shows one string constant although there are some. When removing the annotations, it works

Reproducible: Always
Comment 1 Johannes Rieken CLA 2010-11-22 14:00:58 EST
Created attachment 183592 [details]
Sample code
Comment 2 Dani Megert CLA 2010-11-23 04:00:28 EST
Caused by bad fix for bug 325481.
Comment 3 Ayushman Jain CLA 2010-11-23 04:23:32 EST
Actually its not a bad fix that caused it, but another bug thats manifesting because of the fix. Working on it.
Comment 4 Ayushman Jain CLA 2010-11-23 05:24:44 EST
Fixed with the latest fix for bug 325481

*** This bug has been marked as a duplicate of bug 325481 ***
Comment 5 Ayushman Jain CLA 2010-11-23 06:54:09 EST
(In reply to comment #0)
> [..] When removing the annotations, it works

Forgot to mention - the reason for this behaviour is that org.eclipse.jdt.internal.compiler.parser.SourceTypeConverter.convert(ISourceType[], CompilationResult) uses diet parse to convert source types when the number of annotations is >10. So in the attached code, commenting out 1 or more annotation in IAttributeDefinitionDescriptor makes the no. of annotations <= 10, and hence diet parse is skipped. Since it is the parser's consumeExitVariableWithInitialization() method that sets the initialization for fields, it is only in this case that we end up with the initialization as non-null, causing the earlier fix for bug 325481 to fail.
Comment 6 Srikanth Sankaran CLA 2010-12-07 03:39:40 EST
Verified for 3.7M4 using build id I20101205-2000
Comment 7 Ed Willink CLA 2011-02-02 01:30:48 EST
Content Assist still useless in M5.
Comment 8 Ayushman Jain CLA 2011-02-02 01:36:25 EST
(In reply to comment #7)
> Content Assist still useless in M5.

Can you please elucidate the exact problem you're facing, with a reproducible test case? Thanks!
Comment 9 Ed Willink CLA 2011-02-02 02:06:02 EST
(In reply to comment #8)
> (In reply to comment #7)
> > Content Assist still useless in M5.
> 
> Can you please elucidate the exact problem you're facing, with a reproducible
> test case? Thanks!

In the Java Editor click following the 'dot' in

		String x;
		x.length();

Hit Ctrl+Space; displayed window shows no proposals.
Comment 10 Ayushman Jain CLA 2011-02-02 03:14:45 EST
(In reply to comment #9)
>[..]
> In the Java Editor click following the 'dot' in
> 
>         String x;
>         x.length();
> 
> Hit Ctrl+Space; displayed window shows no proposals.

I couldn't reproduce this. Can you give the exact testcase? What preceedes this code can have an effect on content assist. I just used a simple testcase:
class X{
  void m() {
    String x;
    x.{CTRL-SPACE}
  }
}
and this shows me all proposals. Anyway, this doesn't seem to have any relevance to this particular bug. Please open a fresh bug report with an exact testcase. Thanks!
Comment 11 Dani Megert CLA 2011-02-02 03:29:48 EST
(In reply to comment #7)
> Content Assist still useless in M5.
This is just not true. Content Assist works and worked fine for most people. This bug here as reported with the test case in comment 0 was fixed in M5 is indeed working now. Please file a new bug for your problem with detailed steps to reproduce.
Comment 12 Ed Willink CLA 2011-02-02 03:31:30 EST
(In reply to comment #11)
> (In reply to comment #7)
> > Content Assist still useless in M5.
> This is just not true. Content Assist works and worked fine for most people.
> This bug here as reported with the test case in comment 0 was fixed in M5 is
> indeed working now. Please file a new bug for your problem with detailed steps
> to reproduce.

Will do. Certainly worksforme on a naked platform, but fails with extra plugins. Will need to discvover what breaks JDT.
Comment 13 Dani Megert CLA 2011-02-02 03:36:56 EST
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #7)
> > > Content Assist still useless in M5.
> > This is just not true. Content Assist works and worked fine for most people.
> > This bug here as reported with the test case in comment 0 was fixed in M5 is
> > indeed working now. Please file a new bug for your problem with detailed steps
> > to reproduce.
> 
> Will do. Certainly worksforme on a naked platform, but fails with extra
> plugins. Will need to discvover what breaks JDT.
E.g. Mylyn replaces our processors. Please cc me on the bug.