Bug 202152 - Call to ICompilationUnit.becomeWorkingCopy() breaks JavaModel
Summary: Call to ICompilationUnit.becomeWorkingCopy() breaks JavaModel
Status: VERIFIED DUPLICATE of bug 194399
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.4 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-04 09:35 EDT by Georgi Vachkov CLA
Modified: 2007-09-18 04:52 EDT (History)
1 user (show)

See Also:


Attachments
PDE JUnit test to reproduce the problem (2.97 KB, application/octet-stream)
2007-09-04 09:35 EDT, Georgi Vachkov CLA
no flags Details

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