Bug 170249 - [model] IJavaProject.findType() finds type in different project when editor is open
Summary: [model] IJavaProject.findType() finds type in different project when editor i...
Status: VERIFIED DUPLICATE of bug 169970
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-11 14:31 EST by Harold Gartner CLA
Modified: 2007-09-18 05:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harold Gartner CLA 2007-01-11 14:31:38 EST
Build ID: v3.2.1 M20060921-0945

Steps To Reproduce:
1. Create a Java project called "A".
2. Create package 'com.ibm.sample' in project "A".
3. Create class 'Testit' in package com.ibm.sample in project "A".
4. Create a Java project called "B".
5. Close all open editors.

projectA.findType ("com.ibm.sample.Testit");
- This returns type 'Testit' in project "A".

projectB.findType ("com.ibm.sample.Testit");
- This returns 'null'.

The above works as expected when the Java editor is closed.

Now open the class com.ibm.sample.Testit in project "A" in the Java editor.

With the editor now open:

projectA.findType ("com.ibm.sample.Testit");
- This returns type 'Testit' in project "A".

projectB.findType ("com.ibm.sample.Testit");
- This returns type 'Testit' in project "A".

With the editor open, it is finding the type 'Testit' in the other project when it is clearly not on the classpath of project "B".  projectB.findType should return 'null' when the type is open in the editor.

More information:
Comment 1 Frederic Fusier CLA 2007-01-12 03:24:14 EST
Different scenario but same origin: non-visible working copies are not filtered when added to the NameLookup...


*** This bug has been marked as a duplicate of bug 169970 ***
Comment 2 Maxime Daniel CLA 2007-09-18 05:18:15 EDT
Verified for 3.4 M2 using build I20070917-0010.