Bug 222321 - ResourceSetSynchronizer not updating ALL related Resources
Summary: ResourceSetSynchronizer not updating ALL related Resources
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Chuck Bridgham CLA
QA Contact: Konstantin Komissarchik CLA
URL:
Whiteboard:
Keywords: contributed
: 222681 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-11 17:57 EDT by Chuck Bridgham CLA
Modified: 2008-04-24 00:43 EDT (History)
2 users (show)

See Also:
thatnitind: review+


Attachments
EMF2DOMSSEAdapter patch (1.93 KB, patch)
2008-03-11 18:13 EDT, Chuck Bridgham CLA
bjorn.freeman-benson: iplog+
Details | Diff
ResourceSetWorkbenchEditSynchronizer patch (12.13 KB, patch)
2008-03-11 18:35 EDT, Chuck Bridgham CLA
bjorn.freeman-benson: iplog+
Details | Diff
For 'org.eclipse.wst.common.emfworkbench.integration' (1.17 KB, patch)
2008-03-17 14:27 EDT, Trung CLA
bjorn.freeman-benson: iplog+
Details | Diff
For 'org.eclipse.wst.common.emfworkbench.integration' (2.06 KB, patch)
2008-03-17 14:30 EDT, Trung CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chuck Bridgham CLA 2008-03-11 17:57:51 EDT
With changes to uri, and supporting scenarios including multiple EResource instances associated to an IFile - changes are needed for capturing recent saves, and
Comment 1 Chuck Bridgham CLA 2008-03-11 17:58:30 EDT
Fixes touch EMF2DOMSSERenderer as well to capture saves....
Comment 2 Chuck Bridgham CLA 2008-03-11 18:13:06 EDT
Created attachment 92242 [details]
EMF2DOMSSEAdapter patch
Comment 3 Chuck Bridgham CLA 2008-03-11 18:35:03 EDT
Created attachment 92245 [details]
ResourceSetWorkbenchEditSynchronizer patch
Comment 4 Chuck Bridgham CLA 2008-03-11 18:39:54 EDT
Save events now pass the associated EMFResource instance along to be cached in the recently saved cache.

This way we can differentiate between saves of each EMFResource instance associated with a certain IFile.



The SSEAdapter patch requires the ResourceSetWorkbench... patch applied, as new methods were added.
Comment 5 Nitin Dahyabhai CLA 2008-03-12 17:19:45 EDT
Thanks for the patch, Chuck.  What happens to older code that does not call the new method?
Comment 6 Trung CLA 2008-03-17 14:27:10 EDT
Created attachment 92728 [details]
For 'org.eclipse.wst.common.emfworkbench.integration'

The patch for ResourceSetWorkbenchEditSynchronizer causes a serious error.
Basically, it unloads all Java related resources whenever there is a resource change in the workspace. This results in the inability to locate and load any java resource (class, java files) by EMF utils classes.

I'm still don't understand why other team (especially the JSP team) can pass the smoke test ?

Anyway, here is the patch to end this nightmare.
Comment 7 Trung CLA 2008-03-17 14:30:23 EDT
Created attachment 92729 [details]
For 'org.eclipse.wst.common.emfworkbench.integration'

this new patch has an additional small optimization that I think will be useful for the synchronizer
Comment 8 Chuck Bridgham CLA 2008-03-17 14:54:08 EDT
Thanks for the patches!

I am testing now - 
Comment 9 Carl Anderson CLA 2008-03-17 15:38:11 EDT
*** Bug 222681 has been marked as a duplicate of this bug. ***
Comment 10 Chuck Bridgham CLA 2008-03-17 15:54:09 EDT
So the original fix for this bug still works as intended, and now recognizes related changed resources.  BUT caused a major regression by unloading all JEM resources causing any scenario depending on the JEM reflectoin api's to fail.

After testing, and stepping through the patch - recommend we respin .

Carl is doing a build.
Comment 11 Chuck Bridgham CLA 2008-04-03 11:02:45 EDT
Found an additional regression in 

ResourceSetWorkbenchEditSynchronizer.recentlySavedFilesForceRemove()

Needed to check for null resource, and remove the file from the list as before...

Dropped fix to build
Comment 12 David Williams CLA 2008-04-24 00:43:33 EDT
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.