diff options
author | Pascal Rapicault | 2013-07-29 17:40:44 +0000 |
---|---|---|
committer | Pascal Rapicault | 2013-08-28 00:33:01 +0000 |
commit | 27beb4d5c163c8e1013cc3e4d1c391c9a2fa5299 (patch) | |
tree | 3e972e2a2018cbb19593e07d56d8f6364cb36d04 /bundles/org.eclipse.equinox.p2.tests.verifier | |
parent | c2d8bbf2411c51c40785b283dc69aeace2f1529a (diff) | |
download | rt.equinox.p2-27beb4d5c163c8e1013cc3e4d1c391c9a2fa5299.tar.gz rt.equinox.p2-27beb4d5c163c8e1013cc3e4d1c391c9a2fa5299.tar.xz rt.equinox.p2-27beb4d5c163c8e1013cc3e4d1c391c9a2fa5299.zip |
Bug - 402560,405041 Migration wizard Update to latest versions and shows only those to be migrated.
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.verifier')
3 files changed, 17 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF index 5e61517f5..fdfd0d453 100644 --- a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF @@ -8,7 +8,10 @@ Export-Package: org.eclipse.equinox.internal.p2.tests.verifier;x-internal:=true Require-Bundle: org.eclipse.core.runtime, org.eclipse.equinox.p2.core, org.eclipse.equinox.p2.ui.sdk.scheduler;bundle-version="1.2.0", - org.eclipse.swt;bundle-version="3.102.0" + org.eclipse.swt;bundle-version="3.102.0", + org.eclipse.equinox.p2.metadata;bundle-version="2.2.0", + org.eclipse.equinox.p2.ui;bundle-version="2.3.0", + org.eclipse.equinox.p2.operations;bundle-version="2.3.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.eclipse.equinox.internal.p2.core.helpers, org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration, diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MigrationWizardTestHelper.java b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MigrationWizardTestHelper.java index 49635a008..868e939a0 100644 --- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MigrationWizardTestHelper.java +++ b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/MigrationWizardTestHelper.java @@ -10,15 +10,17 @@ package org.eclipse.equinox.internal.p2.tests.verifier; import java.net.URI; +import java.util.Collection; import org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationSupport; import org.eclipse.equinox.p2.engine.IProfile; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; public class MigrationWizardTestHelper extends MigrationSupport { //Variable that keeps track if the wizard has been requested to open public boolean wizardOpened = false; @Override - protected void openMigrationWizard(IProfile inputProfile, URI[] reposToMigrate) { + protected void openMigrationWizard(final IProfile inputProfile, final Collection<IInstallableUnit> unitsToMigrate, final URI[] reposToMigrate) { wizardOpened = true; } diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java index 5d01fac56..cd36327d5 100644 --- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java +++ b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java @@ -1,10 +1,10 @@ /******************************************************************************* * Copyright (c) 2009, 2013 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials + * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation * Ericsson AB - Ongoing development @@ -20,10 +20,11 @@ import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplicationContext; import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper; -import org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.ImportFromInstallationWizard_c; +import org.eclipse.equinox.internal.p2.ui.sdk.scheduler.migration.MigrationWizard; import org.eclipse.equinox.p2.core.IProvisioningAgent; import org.eclipse.equinox.p2.engine.IProfile; import org.eclipse.equinox.p2.engine.IProfileRegistry; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.query.IQueryResult; import org.eclipse.equinox.p2.query.QueryUtil; import org.eclipse.osgi.service.resolver.*; @@ -35,7 +36,7 @@ import org.osgi.service.packageadmin.PackageAdmin; /** * Application which verifies an install. - * + * * @since 1.0 */ public class VerifierApplication implements IApplication { @@ -106,7 +107,7 @@ public class VerifierApplication implements IApplication { if (DEFAULT_PROPERTIES_FILE.exists()) properties = readProperties(DEFAULT_PROPERTIES_FILE); } catch (IOException e) { - // TODO + // TODO e.printStackTrace(); } } @@ -180,7 +181,7 @@ public class VerifierApplication implements IApplication { /* * Check to ensure all of the bundles in the system are resolved. - * + * * Copied and modified from EclipseStarter#logUnresolvedBundles. * This method prints out all the reasons while asking the resolver directly * will only print out the first reason. @@ -214,7 +215,7 @@ public class VerifierApplication implements IApplication { constraints.add(leafConstraints[i]); } - // found some bundles with missing leaf constraints; log them first + // found some bundles with missing leaf constraints; log them first if (missing.size() > 0) { for (Iterator iter = missing.keySet().iterator(); iter.hasNext();) { BundleDescription description = (BundleDescription) iter.next(); @@ -260,7 +261,7 @@ public class VerifierApplication implements IApplication { } /* - * Return a boolean value indicating whether or not the given resolver error should be + * Return a boolean value indicating whether or not the given resolver error should be * added to our results. */ private boolean shouldAdd(ResolverError error) { @@ -340,7 +341,7 @@ public class VerifierApplication implements IApplication { IProfileRegistry reg = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME); IProfile profile = reg.getProfile(IProfileRegistry.SELF); - ImportFromInstallationWizard_c wizardPage = new ImportFromInstallationWizard_c(profile, new URI[0], false); + MigrationWizard wizardPage = new MigrationWizard(profile, Collections.<IInstallableUnit> emptyList(), new URI[0], false); int cancelAnswer = Integer.parseInt(properties.getProperty("checkMigration.cancelAnswer")); wizardPage.rememberCancellationDecision(cancelAnswer); } |