Bug 397995

Summary: RSEInitJob runs too early
Product: [Tools] Target Management Reporter: David Dykstal <ddykstal.eclipse>
Component: RSEAssignee: David Dykstal <ddykstal.eclipse>
Status: RESOLVED FIXED QA Contact: David Dykstal <ddykstal.eclipse>
Severity: critical    
Priority: P1 CC: dmcknigh, g.watson
Version: 3.4.1Flags: dmcknigh: review+
Target Milestone: 3.4.2   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 400345    
Attachments:
Description Flags
patch to exploit org.eclipse.ui.startup none

Description David Dykstal CLA 2013-01-11 11:46:15 EST
RSEInitJob is scheduled to run without constraint when RSE is initially loaded. Its purpose is to load profiles and to create any initial models objects needed in a new workspace.

Part of loading profiles includes the loading of subsystem configurations. As these are loaded they may trigger code that depends on elements of the workbench that have not fully initialized.

This comes to light in 4.2, perhaps due to some scheduling change in the platform.

The platform team has recommended that we schedule this job later, perhaps exploiting the org.eclipse.ui.startup extension point.
Comment 1 David Dykstal CLA 2013-01-13 15:58:30 EST
Dave - please review the patch in branch dwd-move-init-trial. The change moves the scheduling of the RSEInitJob to org.eclipse.rse.ui from org.eclipse.rse.core. The RSEInitJob and its query API remains unchanged in core, only its scheduling has been changed.
Comment 2 David McKnight CLA 2013-01-14 10:31:08 EST
I looked at and tried out the changes and I don't see any problems so I think this is good to go.
Comment 3 David Dykstal CLA 2013-01-14 16:41:46 EST
Added the version and copyright changes that DaveM suggested from his review.
Comment 4 David Dykstal CLA 2013-02-12 13:41:49 EST
Reopening for problem found in PTP initialization.
Comment 5 David Dykstal CLA 2013-02-12 13:58:01 EST
Created attachment 226947 [details]
patch to exploit org.eclipse.ui.startup

This patch moves the scheduling from the UI plugin activation to a separate class invoked by org.eclipse.ui.startup. It was previously possible to start the workbench and wait for the init job to finish and not have it started if the RSE UI was not activated. By using org.eclipse.ui.startup we avoid the problem.
Comment 6 David Dykstal CLA 2013-02-12 14:02:52 EST
Dave - please review the patch.
Comment 7 Greg Watson CLA 2013-02-12 14:46:34 EST
This patch appears to resolve the issue for PTP.
Comment 8 David McKnight CLA 2013-02-12 15:22:54 EST
The patch looks okay to me.
Comment 9 David Dykstal CLA 2013-02-13 09:54:31 EST
Fix has been tested by PTP