summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-02-14 16:54:03 (EST)
committerPascal Rapicault2013-02-14 16:54:03 (EST)
commit68c4f16c543515b74a3d62145039b58f4cd38812 (patch)
tree096976c135a578d16242eafff01c0772227c50e1
parent54033cd68b3f5136b580d92920bc352b572798b1 (diff)
downloadrt.equinox.p2-68c4f16c543515b74a3d62145039b58f4cd38812.zip
rt.equinox.p2-68c4f16c543515b74a3d62145039b58f4cd38812.tar.gz
rt.equinox.p2-68c4f16c543515b74a3d62145039b58f4cd38812.tar.bz2
Change method signature for easier testingI20130214-2011
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java12
1 files changed, 6 insertions, 6 deletions
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 9bdc282..2448fa6 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
@@ -95,7 +95,11 @@ public class AutomaticUpdateScheduler implements IStartup {
}
public void earlyStartup() {
- if (performMigration())
+ IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IProvisioningAgent.SERVICE_NAME);
+ IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+ IProfile currentProfile = registry.getProfile(profileId);
+
+ if (performMigration(agent, registry, currentProfile))
return;
garbageCollect();
@@ -103,15 +107,11 @@ public class AutomaticUpdateScheduler implements IStartup {
}
//This method returns whether the migration dialog is shown or not
- private boolean performMigration() {
+ private boolean performMigration(IProvisioningAgent agent, IProfileRegistry registry, IProfile currentProfile) {
boolean skipWizard = Boolean.TRUE.toString().equalsIgnoreCase(System.getProperty(ECLIPSE_P2_SKIP_MIGRATION_WIZARD));
if (skipWizard)
return false;
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IProvisioningAgent.SERVICE_NAME);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IProfile currentProfile = registry.getProfile(profileId);
-
if (!baseChanged(agent, registry, currentProfile))
return false;