Bug 223479

Summary: [assist] Member types of missing types are not proposed in class body
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc
Version: 3.3   
Target Milestone: 3.4 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Better patch none

Description David Audel CLA 2008-03-21 06:06:20 EDT
build I20080318-0800

1) create p/A.java
package p;
public class A {
  public class B {
  }
}
2) create X.java
import p.A;
public class X {
  A.B| // ctrl+space at | location
}
3) do crtl+space
B is not proposed

If the completion occurs in a method body then B is proposed

import p.A;
public class X {
  void foo() {
    A.B| // ctrl+space at | location
  }
}
Comment 1 David Audel CLA 2008-03-21 07:35:49 EDT
Created attachment 93119 [details]
Proposed fix
Comment 2 David Audel CLA 2008-03-21 07:50:56 EDT
Created attachment 93121 [details]
Better patch
Comment 3 David Audel CLA 2008-03-21 07:53:54 EDT
Released for 3.4M6

Test added
  CompletionWithMissingTypesTests#test0040()
Comment 4 Jerome Lanneluc CLA 2008-03-26 06:04:00 EDT
To reproduce, X.java must not contain an import statement:
public class X {
  A.B| // ctrl+space at | location
}

In this case, there is no proposal at the given location with I20080318-0800, but there is one with I20080325-0100.

Verified for 3.4M6 using I20080325-0100