Bug 397995 - RSEInitJob runs too early
Summary: RSEInitJob runs too early
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.4.1   Edit
Hardware: PC All
: P1 critical (vote)
Target Milestone: 3.4.2   Edit
Assignee: David Dykstal CLA
QA Contact: David Dykstal CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 400345
  Show dependency tree
 
Reported: 2013-01-11 11:46 EST by David Dykstal CLA
Modified: 2013-02-13 09:54 EST (History)
2 users (show)

See Also:
dmcknigh: review+


Attachments
patch to exploit org.eclipse.ui.startup (3.12 KB, patch)
2013-02-12 13:58 EST, David Dykstal CLA
no flags Details | Diff

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