Bug 11210 - ResourceDeltas are lost when merging deltas
Summary: ResourceDeltas are lost when merging deltas
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-12 15:58 EST by Jay Cagle CLA
Modified: 2002-05-14 13:31 EDT (History)
0 users

See Also:


Attachments

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