Bug 6993

Summary: JavaModel inconsistencies with units outside classpath
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2001-12-17 09:12:28 EST
Build 20011211 + latest JDTCORE head


1.	Create project P1
2. 	Create folder 'txt' not on the classpath
3.	Add compilation unit Outside.java using class wizard (location P1/txt, 
no package)
4.	Notice the package view does not refresh.

// would indicate wrong delta got fired

5.	Force close/reopen project P1
6.	Package view shows 'Outside.java' under P1/txt

7.	Delete 'Outside.java'
8. 	Package view refreshes ok
9.	Add compilation unit 'Outside.java' back to P1/txt (recreating it with 
class wizard)
10.	Wizard complains the type already exists

// would indicate the model info did not get flushed)
Comment 1 Jerome Lanneluc CLA 2001-12-17 11:28:39 EST
Fixed delta problem by changing the involved JavaModelOperations to not create 
deltas if the cu is not in the classpath (the delta processor creates the 
correct non-java resource delta).

Fixed model info problem by hooking in the WorkingCopy.destroy() method so that 
it closes the original element if it was not in the classpath.