Bug 11210

Summary: ResourceDeltas are lost when merging deltas
Product: [Eclipse Project] JDT Reporter: Jay Cagle <jcagle>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Jay Cagle CLA 2002-03-12 15:58:32 EST
Using the Eclipse 20020214 build.

I have a Java project with the following structure:
JavaProject
 - source  (PackageFragmentRoot)
   - com.ibm.test (PackageFragment)
 - folder1 (non Java folder)
   - folder2

I have a wizard which creates two classes in the com.ibm.test package and two 
HTML files in folder2.  In the Java Packages view, if folder2 is selected and 
expanded when the wizard is invokved, after the files are created folder2 will 
not be refreshed correctly to display the two new HTML files.

I have traced the problem and it lies in JavaElementDelta.addAffectedChildren
().  This is called from insertDeltaTree() which is called from 
JavaModelManager.mergeDeltas().  In this case there are two JavaElementDeltas 
being merged.  The first delta for the project contains no resource deltas.  
The second delta for the project contains resource deltas representing the two 
new HTML files.  When the second delta is processed, addAffectedChildren sees 
that there is already a delta for the project so it moves on to process the 
delta's children.  The problem is that it needs to merge the resource deltas.
Comment 1 Jerome Lanneluc CLA 2002-03-15 04:23:25 EST
Thanks for debugging this problem!
Now merging the resource deltas.