Bug 59937

Summary: Should not process saved state delta during startup
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: john.arthorne
Version: 3.0   
Target Milestone: 3.0 M9   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Jerome Lanneluc CLA 2004-04-26 09:49:52 EDT
I20040422

JavaCore.startUp() is processing the saved state delta in the same thread. This 
could cause deadlocks. See bug 59852 for details.
Comment 1 John Arthorne CLA 2004-04-26 10:26:26 EDT
After thinking on this some more, I am also concerned that you may miss resource
deltas or receive deltas out of order, depending on when you install your
resource change listener. If you install your listener on startup, and then
process the save participant delta in a background thread, further changes could
occur to the workspace in between.  This would result in you receive deltas for
new changes before you get a chance to process the save participant delta.  I
think you need to install your listener and process deltas atomically (from the
indexer thread if possible), using  an IWorkspaceRunnable. This would ensure you
process deltas in correct order.
Comment 2 Jerome Lanneluc CLA 2004-04-26 10:46:32 EDT
Thanks John. I'll do that.
Comment 3 Jerome Lanneluc CLA 2004-04-26 10:51:20 EDT
Changed JavaCore.startUp() to post a job in the indexer and add a save 
participant and process the delta atomically.
Comment 4 Frederic Fusier CLA 2004-05-18 12:57:24 EDT
Verified for 3.0 M9 with build I200405180816.