Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2008-11-13 23:27:52 +0000
committerSusan Franklin2008-11-13 23:27:52 +0000
commit04fbe377707641cc8172c8872388fc34a8421229 (patch)
treeee84dbd9f31130a98f6b06af79249ead31ab6746 /bundles/org.eclipse.equinox.p2.ui.sdk.scheduler
parentc567d31810be33203a8332cb0eb1abb5db3eccb0 (diff)
downloadrt.equinox.p2-04fbe377707641cc8172c8872388fc34a8421229.tar.gz
rt.equinox.p2-04fbe377707641cc8172c8872388fc34a8421229.tar.xz
rt.equinox.p2-04fbe377707641cc8172c8872388fc34a8421229.zip
Bug 227582 - [ui] Should the early startup extension be separated from the rest of the UI plugin?
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui.sdk.scheduler')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java12
2 files changed, 17 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
index a0900a12e..e367b38da 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
@@ -80,8 +80,12 @@ public class AutomaticUpdatePlugin extends AbstractUIPlugin {
packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
- // TODO for now we need to manually start up the update checker
- // because the Eclipse Application launch config won't let me specify bundles to start.
+ // TODO for now we need to manually start up the provisioning infrastructure
+ // and the update checker, because the Eclipse Application launch config won't
+ // let me specify bundles to start.
+ getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
+ getBundle("org.eclipse.equinox.frameworkadmin.equinox").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
+ getBundle("org.eclipse.equinox.simpleconfigurator.manipulator").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
getBundle("org.eclipse.equinox.p2.updatechecker").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
registrationChecker = context.registerService(IUpdateChecker.SERVICE_NAME, new UpdateChecker(), null);
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
index 77724bcfb..53e9fccde 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
@@ -22,6 +22,7 @@ import org.eclipse.equinox.internal.provisional.p2.query.Collector;
import org.eclipse.equinox.internal.provisional.p2.query.Query;
import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker;
import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener;
+import org.eclipse.equinox.internal.provisional.p2.updatechecker.UpdateEvent;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.statushandlers.StatusManager;
@@ -138,7 +139,16 @@ public class AutomaticUpdateScheduler implements IStartup {
delay = computeDelay(pref);
poll = computePoll(pref);
}
- listener = AutomaticUpdatePlugin.getDefault().getAutomaticUpdater();
+ // We do not access the AutomaticUpdater directly when we register
+ // the listener. This prevents the UI classes from being started up
+ // too soon.
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=227582
+ listener = new IUpdateListener() {
+ public void updatesAvailable(UpdateEvent event) {
+ AutomaticUpdatePlugin.getDefault().getAutomaticUpdater().updatesAvailable(event);
+ }
+
+ };
checker.addUpdateCheck(profileId, getProfileQuery(), delay, poll, listener);
}

Back to the top