diff options
author | David Dykstal | 2012-12-21 00:04:01 +0000 |
---|---|---|
committer | David Dykstal | 2012-12-21 00:04:01 +0000 |
commit | 5108908aa6d2169af5a15b156791e53afeeb08be (patch) | |
tree | 9e2a4e38e451633ad951009e2a467b41b8e949a6 | |
parent | 76c411895e8e53b3ed9d74c729490cad54957324 (diff) | |
download | org.eclipse.tm-dwd-move-init-trial.tar.gz org.eclipse.tm-dwd-move-init-trial.tar.xz org.eclipse.tm-dwd-move-init-trial.zip |
Test moving the scheduling of the RSEInitJob to the RSEUIPlugindwd-move-init-trial
The RSEInitJob loads profiles which instantiates subsystem configurations.
If these subsystem configurations are located in plugins that depend on
UI plugins then we run the risk of activating these plugins before
the platform is ready resulting in load errors of various kinds.
There appears to be a change in job scheduling timing that makes this
error more apparent.
4 files changed, 23 insertions, 17 deletions
diff --git a/rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd b/rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd index 1027cb2bd..d56951971 100644 --- a/rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd +++ b/rse/plugins/org.eclipse.rse.core/schema/modelInitializers.exsd @@ -2,19 +2,19 @@ <!-- Schema file written by PDE --> <schema targetNamespace="org.eclipse.rse.core" xmlns="http://www.w3.org/2001/XMLSchema"> <annotation> - <appinfo> + <appInfo> <meta.schema plugin="org.eclipse.rse.core" id="modelInitializers" name="Model Initializers"/> - </appinfo> + </appInfo> <documentation> - A model initializer is used to create supplemental connections and filter pools after the RSE model has been restored from its persistent form. The base RSE uses this extension point to supply the "Local" connection if one has not already been created for this workspace. Other extenders of RSE may use this to augment the mode in other ways. An initializer is run at the end of the initialization job begun by RSE when it is activated. + A model initializer is used to create supplemental connections and filter pools after the RSE model has been restored from its persistent form. The base RSE uses this extension point to supply the "Local" connection if one has not already been created for this workspace. Other extenders of RSE may use this to augment the model in other ways. An initializer is run at the end of the initialization job begun by RSE when it is activated. </documentation> </annotation> <element name="extension"> <annotation> - <appinfo> + <appInfo> <meta.element /> - </appinfo> + </appInfo> </annotation> <complexType> <sequence> @@ -39,9 +39,9 @@ <documentation> </documentation> - <appinfo> + <appInfo> <meta.attribute translatable="true"/> - </appinfo> + </appInfo> </annotation> </attribute> </complexType> @@ -54,9 +54,9 @@ <documentation> A class that extends <b>org.eclipse.rse.core.IRSEModelInitializer</b>. </documentation> - <appinfo> + <appInfo> <meta.attribute kind="java" basedOn=":org.eclipse.rse.core.IRSEModelInitializer"/> - </appinfo> + </appInfo> </annotation> </attribute> <attribute name="type"> @@ -78,18 +78,18 @@ </element> <annotation> - <appinfo> + <appInfo> <meta.section type="since"/> - </appinfo> + </appInfo> <documentation> RSE 3.0 </documentation> </annotation> <annotation> - <appinfo> + <appInfo> <meta.section type="examples"/> - </appinfo> + </appInfo> <documentation> An example taken from the plug-in org.eclipse.rse.ui: <pre> @@ -103,9 +103,9 @@ <annotation> - <appinfo> + <appInfo> <meta.section type="copyright"/> - </appinfo> + </appInfo> <documentation> Copyright (c) 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java index 3ea90e23e..9ce9edf3f 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/RSECorePlugin.java @@ -307,8 +307,10 @@ public class RSECorePlugin extends Plugin { public void start(BundleContext context) throws Exception { super.start(context); registerKeystoreProviders(); + /* RSEInitJob job = RSEInitJob.getInstance(); job.schedule(); + */ } /* diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java index 551e19601..0b0cbb6c4 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/RSEInitJob.java @@ -11,6 +11,7 @@ * David Dykstal (IBM) = [226958] add status values to waitForInitCompletion(phase) * David Dykstal (IBM) - [235581] Initialize RSE should be a daemon job * David McKnight (IBM) - [283033] remoteFileTypes extension point should include "xml" type + * David Dykstal (IBM) - [] RSEInitJob runs too early ********************************************************************************/ package org.eclipse.rse.internal.core; @@ -230,10 +231,10 @@ public final class RSEInitJob extends Job { return ResourcesPlugin.getEncoding(); } }); -*/ + */ initializerPhase.done(result); - // finish up - propogate cancel if necessary + // finish up - propagate cancel if necessary if (monitor.isCanceled()) { result = Status.CANCEL_STATUS; } else { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java index 98daf13a0..52a8ba2c8 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java @@ -53,6 +53,7 @@ import org.eclipse.rse.core.model.ISystemProfileManager; import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; +import org.eclipse.rse.internal.core.RSEInitJob; import org.eclipse.rse.internal.core.model.SystemProfileManager; import org.eclipse.rse.internal.core.model.SystemRegistry; import org.eclipse.rse.internal.ui.RSESystemTypeAdapterFactory; @@ -385,6 +386,8 @@ public class RSEUIPlugin extends SystemBasePlugin public void start(BundleContext context) throws Exception { super.start(context); + + RSEInitJob.getInstance().schedule(); messageFile = getMessageFile("systemmessages.xml"); //$NON-NLS-1$ defaultMessageFile = getDefaultMessageFile("systemmessages.xml"); //$NON-NLS-1$ |