Bug 202152

Summary: Call to ICompilationUnit.becomeWorkingCopy() breaks JavaModel
Product: [Eclipse Project] JDT Reporter: Georgi Vachkov <georgi.vachkov>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: jerome_lanneluc
Version: 3.3   
Target Milestone: 3.4 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
PDE JUnit test to reproduce the problem none

Description Georgi Vachkov CLA 2007-09-04 09:35:09 EDT
Build ID: I20070625-1500

Steps To Reproduce:
1.Create one java project and add class test.pck.Test
2.Create another java project
3.In PDE project first call ICompilationUnit.becomeWorkingCopy() for test.pck.Test CU. after that calling findType on second java project for test.pck.Test returns SourceType but shoud return null.

More information:
Comment 1 Georgi Vachkov CLA 2007-09-04 09:35:43 EDT
Created attachment 77644 [details]
PDE JUnit test to reproduce the problem
Comment 2 Jerome Lanneluc CLA 2007-09-04 10:16:37 EDT

*** This bug has been marked as a duplicate of bug 194399 ***
Comment 3 Jerome Lanneluc CLA 2007-09-18 04:39:36 EDT
The problem reported here was that findType(...) would consider all opened working copies instead of scoping them to the project. The fix for bug 194399 consists:
- in ordering the working copies per project
- and in filtering out the working copies that don't belong to this project 
So the fix for bug 194399 also fixes this bug.
Comment 4 Maxime Daniel CLA 2007-09-18 04:52:56 EDT
Verified for 3.4 M2 using build I20070917-0010.