Bug 98684 - [search] Code assist shown inner types of unreleated project
Summary: [search] Code assist shown inner types of unreleated project
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-07 10:28 EDT by Martin Aeschlimann CLA
Modified: 2006-02-14 12:27 EST (History)
0 users

See Also:


Attachments
Possible fix (989 bytes, patch)
2006-02-08 12:30 EST, David Audel CLA
no flags Details | Diff
New patch to fix this issue (9.72 KB, patch)
2006-02-10 03:54 EST, Frederic Fusier CLA
no flags Details | Diff

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