Bug 207441

Summary: Wrong delta for files created in folders that are on a java project as classes folder
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: adrian.mitev, daniel_megert, david_audel, eric_jodet, jerome_lanneluc, manderse, philippe_mulet, remy.suen
Version: 3.3.1Flags: philippe_mulet: pmc_approved+
Target Milestone: 3.3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix and regression test none

Description Jerome Lanneluc CLA 2007-10-25 09:26:55 EDT
+++ This bug was initially created as a clone of Bug #207146 +++

Build ID: I20070601-1539

Steps To Reproduce:
1. Create Java project A
2. Create a folder named "resources" in project A
3. Create Java Project B
4. Add the "resources" folder from A as Classes folder to Project B
5. Add file "test" to folder "/A/resources".
Observe: The Java delta is wrong (it is missing a delta for project A)
Java Model[*]: {CHILDREN}
	B[*]: {CHILDREN}
		/A/resources[*]: {CONTENT}
			ResourceDelta(/A/resources/test)[+]
Comment 1 Jerome Lanneluc CLA 2007-10-25 09:35:57 EDT
Created attachment 81157 [details]
Proposed fix and regression test
Comment 2 Max Rydahl Andersen CLA 2007-10-25 09:43:12 EDT
Any chance this could make it into 3.3.1.1/a ? :)

btw. the best workaround i've found until now is to touch all META-INF and MANIFEST.MF files in the related project when a resource is changed - then the tree is actually updated in 3.3.1 (but of course less inefficient)

project.accept(new IResourceProxyVisitor() {
		public boolean visit(IResourceProxy proxy) throws CoreException 
	
				if(proxy.getName().equals("MANIFEST-MF") || proxy.getName().equals("META-INF")) {
				proxy.requestResource().touch(monitor);
				}
				return true;
			}
	}, IResource.DEPTH_INFINITE);

This triggers the isManifestChange method in PackageExplorerContentProvider.
			
Comment 3 Jerome Lanneluc CLA 2007-10-25 09:49:19 EDT
(In reply to comment #2)
> Any chance this could make it into 3.3.1.1/a ? :)
Sorry but there is no chance that this would make it into 3.3.1.1 as this is not a regression introcuced between 3.3 and 3.3.1.
Comment 4 Jerome Lanneluc CLA 2007-10-25 11:45:48 EDT
Fix and test released for 3.4M3.
Comment 5 Max Rydahl Andersen CLA 2007-10-25 12:23:57 EDT
what about eclipse 3.3.x ? 
(I know 3.3.1 were optimistic, but this is a bug and should at least be fixed in 3.3.2 IMO)
Comment 6 Jerome Lanneluc CLA 2007-10-26 04:55:17 EDT
Fix and test released for 3.3.2
Comment 7 David Audel CLA 2007-10-30 10:30:46 EDT
Verified for 3.4M3 using I20071029-0010 build.
Comment 8 Jerome Lanneluc CLA 2007-11-21 05:15:39 EST
This bug caused the Package Explorer to not update in the described scenario and there is no workaround. This fix needs to be included in 3.3.2. Philippe please approve.
Comment 9 Philipe Mulet CLA 2007-11-23 09:17:56 EST
+1 for 3.3.2
Comment 10 Eric Jodet CLA 2008-01-24 04:43:30 EST
Verified for 3.3.2 using M20080123-0800 build