Bug 98684

Summary: [search] Code assist shown inner types of unreleated project
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Possible fix
none
New patch to fix this issue none

Description Martin Aeschlimann CLA 2005-06-07 10:28:50 EDT
20040506

Code assist for import statements shows inner types of a project not visible on
the current classpath.
Project1 and project2 are unreleated.

project P1:

package p1;
class A1 {
   public static class A1Inner1 {}
   public static class A1Inner2 {}
}

project P2;
package p2;

import A| code assist here

class A2 {
   public static class A2Inner1 {}
   public static class A2Inner2 {}
}
Comment 1 David Audel CLA 2005-06-08 10:45:23 EDT
I cannot reproduce the bug every time (i was able to reproduce it only one time
and i don't know how)
Comment 2 David Audel CLA 2006-02-08 12:29:24 EST
I reproduce the bug in I200601311200

To reproduce the bug, edit A1.java and do not save the file.
By doing this, the workingCopy will be use to find the type instead the index.
Comment 3 David Audel CLA 2006-02-08 12:30:35 EST
Created attachment 34358 [details]
Possible fix
Comment 4 David Audel CLA 2006-02-08 12:32:59 EST
The bug seems to be inside BasicSearchEngine.

Reassign to Frederic.
Comment 5 Frederic Fusier CLA 2006-02-10 03:54:24 EST
Created attachment 34488 [details]
New patch to fix this issue

Previous patch has side effect due to the fact that JavaSearchScope was not valid for working copies when their parent was not accessible...
Comment 6 Frederic Fusier CLA 2006-02-10 03:55:48 EST
Released in HEAD.

Test case added in WorkingCopySearchTests
Comment 7 David Audel CLA 2006-02-14 12:27:08 EST
Verified for 3.2 M5 using build I20060214-0010