Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-02-11 15:44:28 +0000
committerPascal Rapicault2010-02-11 15:44:28 +0000
commit6cea88679a7f7c0f44a98f299db25ad4059a0327 (patch)
treec2eb9e6c512424b7f6a86791c8cc2b6fdaef4571 /bundles
parentdbcb0f62a616280180e7714169fe5e86fb743d4a (diff)
downloadrt.equinox.p2-6cea88679a7f7c0f44a98f299db25ad4059a0327.tar.gz
rt.equinox.p2-6cea88679a7f7c0f44a98f299db25ad4059a0327.tar.xz
rt.equinox.p2-6cea88679a7f7c0f44a98f299db25ad4059a0327.zip
Initial release of the planner API
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java109
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java (renamed from bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IPlanner.java)19
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java97
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/.classpath2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryMissingSizeData.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MD5Tests.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/AutomatedDirectorTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/Bug203637.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest2.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/ReplacePlanTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/SingletonTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/UpdateTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/ProfileSynchronizerTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ActionManagerTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/RepoValidator.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/installer/InstallDescriptionParserTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ArtifactKeyParsingTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/FragmentMethodTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/InstallableUnitTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/LatestIUTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/MultipleIUAndFragmentTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ProvidedCapabilityTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/LocalMetadataRepositoryTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatATest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatArrayTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatNTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatPTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatProcessingTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatQTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatRTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatSTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/IntersectionTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/MultiplicityTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawRangeWithOriginalTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/ProvisioningPerformanceTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AddIUProperty.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AdditionalConstraints.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInRunningInstance.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOptional.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AnotherSingleton.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug249605.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252638.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet1.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug255984.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug262580.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270656.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271067.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271954.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug272251.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug278668.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104bis.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DependencyOnSelf.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DropinsScenario.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationLargeConflict.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/FindingPatchesThroughUpdates.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/GreedyRequirement.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter2.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest2.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency2.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency3.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptional.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalNonGreedyRequirement.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies2.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies3.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleProvider.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoRequirements.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PP2ShouldFailToInstall.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchFailingToInstall.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest10.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest11.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest13.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1b.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1c.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest3.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest4.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest5.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7b.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest8.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch2.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch3.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional2.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional3.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUninstall.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate2.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate3.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate4.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate5.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest1.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SWTFragment.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies2.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies3.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies4.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies5.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest2.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest3.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest4.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest5.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TwoVersionsOfWSDL.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UninstallEverything.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateQueryTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AbstractPublisherActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceMatcher.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/DefaultCUsActionTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/VersionAdviceTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/TestUpdateListener.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/UpdateCheckerTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs15
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java8
245 files changed, 1008 insertions, 871 deletions
diff --git a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
index 46f109c5d..c148a0396 100644
--- a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@ Import-Package: org.eclipse.core.runtime;common=split,
org.eclipse.equinox.p2.engine,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
org.eclipse.equinox.p2.repository.artifact,
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
index 6552edcea..4e52a3ed7 100644
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
+++ b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -7,9 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.console;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
@@ -198,7 +201,7 @@ public class ProvisioningHelper {
throw new ProvisionException("No director service found.");
ProvisioningContext context = new ProvisioningContext();
ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.addInstallableUnits(units);
+ request.addAll(units.toSet());
IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
return PlanExecutionHelper.executePlan(result, engine, context, progress);
}
@@ -297,7 +300,7 @@ public class ProvisioningHelper {
throw new ProvisionException("No engine service found.");
ProvisioningContext context = new ProvisioningContext();
ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.removeInstallableUnits(units);
+ request.removeAll(units.toSet());
IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
return PlanExecutionHelper.executePlan(result, engine, context, progress);
}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
index 73175ada2..065f54cda 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
@@ -18,6 +18,7 @@ Import-Package: org.eclipse.equinox.app,
org.eclipse.equinox.p2.engine,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
org.eclipse.equinox.p2.repository.artifact,
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
index 4f770a7a6..f6e677966 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -9,9 +9,12 @@
* IBM Corporation - initial API and implementation
* Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
* EclipseSource - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.director.app;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
@@ -29,6 +32,7 @@ import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
@@ -94,9 +98,9 @@ public class Application implements IApplication {
ProfileChangeRequest request = new ProfileChangeRequest(profile);
markRoots(request, roots);
if (install) {
- request.addInstallableUnits(roots);
+ request.addAll(roots.toSet());
} else {
- request.removeInstallableUnits(roots);
+ request.removeAll(roots.toSet());
}
return request;
}
@@ -244,7 +248,7 @@ public class Application implements IApplication {
throw new RuntimeException(Messages.Missing_Engine);
}
- private void markRoots(ProfileChangeRequest request, IQueryResult<IInstallableUnit> roots) {
+ private void markRoots(IProfileChangeRequest request, IQueryResult<IInstallableUnit> roots) {
for (Iterator<IInstallableUnit> iterator = roots.iterator(); iterator.hasNext();) {
request.setInstallableUnitProfileProperty(iterator.next(), IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
}
@@ -267,13 +271,13 @@ public class Application implements IApplication {
}
private void printRequest(ProfileChangeRequest request) {
- IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
- IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
- for (int i = 0; i < toAdd.length; i++) {
- System.out.println(NLS.bind(Messages.Installing, toAdd[i].getId(), toAdd[i].getVersion()));
+ Collection<IInstallableUnit> toAdd = request.getAdditions();
+ Collection<IInstallableUnit> toRemove = request.getRemovals();
+ for (IInstallableUnit added : toAdd) {
+ System.out.println(NLS.bind(Messages.Installing, added.getId(), added.getVersion()));
}
- for (int i = 0; i < toRemove.length; i++) {
- System.out.println(NLS.bind(Messages.Uninstalling, toRemove[i].getId(), toRemove[i].getVersion()));
+ for (IInstallableUnit removed : toRemove) {
+ System.out.println(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
}
}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
index a7c01dce2..860032450 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -9,9 +9,12 @@
* IBM Corporation - initial API and implementation
* Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
* EclipseSource - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.director.app;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -30,6 +33,7 @@ import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
@@ -207,12 +211,12 @@ public class DirectorApplication implements IApplication {
private IProvisioningAgent agent;
private boolean noArtifactRepositorySpecified = false;
- private ProfileChangeRequest buildProvisioningRequest(IProfile profile, IInstallableUnit[] installs, IInstallableUnit[] uninstalls) {
+ private ProfileChangeRequest buildProvisioningRequest(IProfile profile, Collection<IInstallableUnit> installs, Collection<IInstallableUnit> uninstalls) {
ProfileChangeRequest request = new ProfileChangeRequest(profile);
markRoots(request, installs);
markRoots(request, uninstalls);
- request.addInstallableUnits(installs);
- request.removeInstallableUnits(uninstalls);
+ request.addAll(installs);
+ request.removeAll(uninstalls);
return request;
}
@@ -242,7 +246,7 @@ public class DirectorApplication implements IApplication {
return new CompoundQueryable<IInstallableUnit>(locationQueryables).query(query, nullMonitor);
}
- private IInstallableUnit[] collectRoots(IProfile profile, List<IVersionedId> rootNames, boolean forInstall) throws CoreException {
+ private Collection<IInstallableUnit> collectRoots(IProfile profile, List<IVersionedId> rootNames, boolean forInstall) throws CoreException {
ArrayList<IInstallableUnit> allRoots = new ArrayList<IInstallableUnit>();
int top = rootNames.size();
for (int i = 0; i < top; ++i) {
@@ -263,7 +267,7 @@ public class DirectorApplication implements IApplication {
allRoots.add(itor.next());
} while (itor.hasNext());
}
- return allRoots.toArray(new IInstallableUnit[allRoots.size()]);
+ return allRoots;
}
synchronized Bundle getBundle(String symbolicName) {
@@ -466,9 +470,10 @@ public class DirectorApplication implements IApplication {
logStatus(status);
}
- private void markRoots(ProfileChangeRequest request, IInstallableUnit[] roots) {
- for (int idx = 0; idx < roots.length; ++idx)
- request.setInstallableUnitProfileProperty(roots[idx], IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+ private void markRoots(IProfileChangeRequest request, Collection<IInstallableUnit> roots) {
+ for (IInstallableUnit root : roots) {
+ request.setInstallableUnitProfileProperty(root, IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+ }
}
private void missingArgument(String argumentName) throws CoreException {
@@ -502,8 +507,8 @@ public class DirectorApplication implements IApplication {
private void performProvisioningActions() throws CoreException {
IProfile profile = initializeProfile();
- IInstallableUnit[] installs = collectRoots(profile, rootsToInstall, true);
- IInstallableUnit[] uninstalls = collectRoots(profile, rootsToUninstall, false);
+ Collection<IInstallableUnit> installs = collectRoots(profile, rootsToInstall, true);
+ Collection<IInstallableUnit> uninstalls = collectRoots(profile, rootsToUninstall, false);
// keep this result status in case there is a problem so we can report it to the user
boolean wasRoaming = Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue();
@@ -554,13 +559,13 @@ public class DirectorApplication implements IApplication {
}
private void printRequest(ProfileChangeRequest request) {
- IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
- for (int i = 0; i < toAdd.length; i++) {
- printMessage(NLS.bind(Messages.Installing, toAdd[i].getId(), toAdd[i].getVersion()));
+ Collection<IInstallableUnit> toAdd = request.getAdditions();
+ for (IInstallableUnit added : toAdd) {
+ printMessage(NLS.bind(Messages.Installing, added.getId(), added.getVersion()));
}
- IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
- for (int i = 0; i < toRemove.length; i++) {
- printMessage(NLS.bind(Messages.Uninstalling, toRemove[i].getId(), toRemove[i].getVersion()));
+ Collection<IInstallableUnit> toRemove = request.getRemovals();
+ for (IInstallableUnit removed : toRemove) {
+ printMessage(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
}
}
diff --git a/bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
index f54853b77..2e2a59896 100644
--- a/bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
@@ -21,7 +21,7 @@ Import-Package: org.eclipse.core.expressions,
org.eclipse.osgi.util;version="1.0.0",
org.osgi.framework;version="1.3.0"
Export-Package: org.eclipse.equinox.internal.p2.director;x-friends:="org.eclipse.equinox.p2.exemplarysetup,org.eclipse.pde.core,org.eclipse.equinox.p2.repository.tools",
- org.eclipse.equinox.internal.p2.rollback;x-friends:="org.eclipse.equinox.p2.ui",
+ org.eclipse.equinox.internal.p2.rollback,
org.eclipse.equinox.internal.provisional.p2.director;
x-friends:="org.eclipse.equinox.p2.console,
org.eclipse.equinox.p2.director.app,
@@ -35,7 +35,8 @@ Export-Package: org.eclipse.equinox.internal.p2.director;x-friends:="org.eclipse
org.eclipse.equinox.p2.updatechecker,
org.eclipse.pde.ui,
org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.pde.core"
+ org.eclipse.pde.core",
+ org.eclipse.equinox.p2.planner
Bundle-Activator: org.eclipse.equinox.internal.p2.director.DirectorActivator
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java
index 2ab6904af..08935c47a 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
* 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
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.director;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
import org.eclipse.equinox.p2.engine.IEngine;
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
index 69aaa00d8..54d5191d0 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
@@ -8,6 +8,7 @@
* Daniel Le Berre - Fix in the encoding and the optimization function
* Alban Browaeys - Optimized string concatenation in bug 251357
* Jed Anderson - switch from opb files to API calls to DependencyHelper in bug 200380
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.director;
@@ -140,7 +141,7 @@ public class Projector {
return !lastState.query(new InstallableUnitQuery(iu), null).isEmpty();
}
- public void encode(IInstallableUnit entryPointIU, IInstallableUnit[] alreadyExistingRoots, IQueryable<IInstallableUnit> installedIUs, IInstallableUnit[] newRoots, IProgressMonitor monitor) {
+ public void encode(IInstallableUnit entryPointIU, IInstallableUnit[] alreadyExistingRoots, IQueryable<IInstallableUnit> installedIUs, Collection<IInstallableUnit> newRoots, IProgressMonitor monitor) {
alreadyInstalledIUs = Arrays.asList(alreadyExistingRoots);
lastState = installedIUs;
this.entryPoint = entryPointIU;
@@ -181,7 +182,7 @@ public class Projector {
}
createConstraintsForSingleton();
- createMustHave(entryPointIU, alreadyExistingRoots, newRoots);
+ createMustHave(entryPointIU, alreadyExistingRoots);
createOptimizationFunction(entryPointIU, newRoots);
if (DEBUG) {
@@ -199,7 +200,7 @@ public class Projector {
}
//Create an optimization function favoring the highest version of each IU
- private void createOptimizationFunction(IInstallableUnit metaIu, IInstallableUnit[] newRoots) {
+ private void createOptimizationFunction(IInstallableUnit metaIu, Collection<IInstallableUnit> newRoots) {
List<WeightedObject<? extends Object>> weightedObjects = new ArrayList<WeightedObject<? extends Object>>();
@@ -279,13 +280,8 @@ public class Projector {
}
}
- private boolean isRoot(IInstallableUnit iu, IInstallableUnit[] newRoots) {
- for (IInstallableUnit root : newRoots) {
- if (root == iu) {
- return true;
- }
- }
- return false;
+ private boolean isRoot(IInstallableUnit iu, Collection<IInstallableUnit> newRoots) {
+ return newRoots.contains(iu);
}
private void createObjectiveFunction(List<WeightedObject<? extends Object>> weightedObjects) {
@@ -305,7 +301,7 @@ public class Projector {
dependencyHelper.setObjectiveFunction(array);
}
- private void createMustHave(IInstallableUnit iu, IInstallableUnit[] alreadyExistingRoots, IInstallableUnit[] newRoots) throws ContradictionException {
+ private void createMustHave(IInstallableUnit iu, IInstallableUnit[] alreadyExistingRoots) throws ContradictionException {
processIU(iu, true);
if (DEBUG) {
Tracing.debug(iu + "=1"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java
index 58bce1e85..ea506ee69 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java
@@ -1,13 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. 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
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.director;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
+import java.util.Collection;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
@@ -43,10 +48,10 @@ public class SimpleDirector implements IDirector {
String taskName = NLS.bind(Messages.Director_Task_Installing, request.getProfile().getProperty(IProfile.PROP_INSTALL_FOLDER));
SubMonitor sub = SubMonitor.convert(monitor, taskName, PlanWork + EngineWork);
try {
- IInstallableUnit[] installRoots = request.getAddedInstallableUnits();
+ Collection<IInstallableUnit> installRoots = request.getAdditions();
// mark the roots as such
- for (int i = 0; i < installRoots.length; i++) {
- request.setInstallableUnitProfileProperty(installRoots[i], IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+ for (IInstallableUnit root : installRoots) {
+ request.setInstallableUnitProfileProperty(root, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
}
IProvisioningPlan plan = planner.getProvisioningPlan(request, context, sub.newChild(PlanWork));
return PlanExecutionHelper.executePlan(plan, engine, context, sub.newChild(EngineWork));
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index 7140be237..2b1454a91 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -7,6 +7,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Genuitec - bug fixes
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.director;
@@ -28,6 +29,8 @@ import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.ExpressionQuery;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
@@ -72,14 +75,14 @@ public class SimplePlanner implements IPlanner {
}
private Map<IInstallableUnit, RequestStatus>[] buildDetailedErrors(ProfileChangeRequest changeRequest) {
- IInstallableUnit[] added = changeRequest.getAddedInstallableUnits();
- IInstallableUnit[] removed = changeRequest.getRemovedInstallableUnits();
- Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(added.length + removed.length);
- for (int i = 0; i < added.length; i++) {
- requestStatus.put(added[i], new RequestStatus(added[i], RequestStatus.ADDED, IStatus.ERROR, null));
+ Collection<IInstallableUnit> requestedAdditions = changeRequest.getAdditions();
+ Collection<IInstallableUnit> requestedRemovals = changeRequest.getRemovals();
+ Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(requestedAdditions.size() + requestedAdditions.size());
+ for (IInstallableUnit added : requestedAdditions) {
+ requestStatus.put(added, new RequestStatus(added, RequestStatus.ADDED, IStatus.ERROR, null));
}
- for (int i = 0; i < removed.length; i++) {
- requestStatus.put(removed[i], new RequestStatus(removed[i], RequestStatus.REMOVED, IStatus.ERROR, null));
+ for (IInstallableUnit removed : requestedRemovals) {
+ requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.ERROR, null));
}
@SuppressWarnings("unchecked")
Map<IInstallableUnit, RequestStatus>[] maps = new Map[] {requestStatus, null};
@@ -87,21 +90,21 @@ public class SimplePlanner implements IPlanner {
}
private Map<IInstallableUnit, RequestStatus>[] computeActualChangeRequest(Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest) {
- IInstallableUnit[] added = changeRequest.getAddedInstallableUnits();
- IInstallableUnit[] removed = changeRequest.getRemovedInstallableUnits();
- Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(added.length + removed.length);
- for (int i = 0; i < added.length; i++) {
- if (toState.contains(added[i]))
- requestStatus.put(added[i], new RequestStatus(added[i], RequestStatus.ADDED, IStatus.OK, null));
+ Collection<IInstallableUnit> requestedAdditions = changeRequest.getAdditions();
+ Collection<IInstallableUnit> requestedRemovals = changeRequest.getRemovals();
+ Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(requestedAdditions.size() + requestedRemovals.size());
+ for (IInstallableUnit added : requestedAdditions) {
+ if (toState.contains(added))
+ requestStatus.put(added, new RequestStatus(added, RequestStatus.ADDED, IStatus.OK, null));
else
- requestStatus.put(added[i], new RequestStatus(added[i], RequestStatus.ADDED, IStatus.ERROR, null));
+ requestStatus.put(added, new RequestStatus(added, RequestStatus.ADDED, IStatus.ERROR, null));
}
- for (int i = 0; i < removed.length; i++) {
- if (!toState.contains(removed[i]))
- requestStatus.put(removed[i], new RequestStatus(removed[i], RequestStatus.REMOVED, IStatus.OK, null));
+ for (IInstallableUnit removed : requestedRemovals) {
+ if (!toState.contains(removed))
+ requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.OK, null));
else
- requestStatus.put(removed[i], new RequestStatus(removed[i], RequestStatus.REMOVED, IStatus.ERROR, null));
+ requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.ERROR, null));
}
//Compute the side effect changes (e.g. things installed optionally going away)
@@ -192,20 +195,20 @@ public class SimplePlanner implements IPlanner {
SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
sub.setTaskName(Messages.Director_Task_Resolving_Dependencies);
try {
- ProfileChangeRequest profileChangeRequest = FormerState.generateProfileDeltaChangeRequest(currentProfile, targetProfile);
+ IProfileChangeRequest profileChangeRequest = FormerState.generateProfileDeltaChangeRequest(currentProfile, targetProfile);
ProvisioningContext context = new ProvisioningContext(new URI[0]);
if (context.getProperty(INCLUDE_PROFILE_IUS) == null)
context.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString());
context.setExtraIUs(Arrays.asList(targetProfile.available(InstallableUnitQuery.ANY, null).toArray(IInstallableUnit.class)));
- return getProvisioningPlan(profileChangeRequest, context, sub.newChild(ExpandWork / 2));
+ return getProvisioningPlan((ProfileChangeRequest) profileChangeRequest, context, sub.newChild(ExpandWork / 2));
} finally {
sub.done();
}
}
- public static IInstallableUnit[] findPlannerMarkedIUs(final IProfile profile) {
+ public static Collection<IInstallableUnit> findPlannerMarkedIUs(final IProfile profile) {
IQuery<IInstallableUnit> markerQuery = new IUProfilePropertyQuery(INCLUSION_RULES, null);
- return profile.query(markerQuery, null).toArray(IInstallableUnit.class);
+ return profile.query(markerQuery, null).toSet();
}
public static Dictionary<String, String> createSelectionContext(Map<String, String> properties) {
@@ -302,8 +305,8 @@ public class SimplePlanner implements IPlanner {
URI[] metadataRepositories = (context != null) ? context.getMetadataRepositories() : null;
Dictionary<String, String> newSelectionContext = createSelectionContext(profileChangeRequest.getProfileProperties());
- List<IInstallableUnit> extraIUs = new ArrayList<IInstallableUnit>(Arrays.asList(profileChangeRequest.getAddedInstallableUnits()));
- extraIUs.addAll(Arrays.asList(profileChangeRequest.getRemovedInstallableUnits()));
+ List<IInstallableUnit> extraIUs = new ArrayList<IInstallableUnit>(profileChangeRequest.getAdditions());
+ extraIUs.addAll(profileChangeRequest.getRemovals());
if (context == null || context.getProperty(INCLUDE_PROFILE_IUS) == null || context.getProperty(INCLUDE_PROFILE_IUS).equalsIgnoreCase(Boolean.TRUE.toString())) {
Iterator<IInstallableUnit> itor = profile.available(InstallableUnitQuery.ANY, null).iterator();
while (itor.hasNext())
@@ -317,7 +320,7 @@ public class SimplePlanner implements IPlanner {
if (slice == null)
return new ProvisioningPlan(slicer.getStatus(), profile, context, null);
Projector projector = new Projector(slice, newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
- projector.encode((IInstallableUnit) updatedPlan[0], (IInstallableUnit[]) updatedPlan[1], profile, profileChangeRequest.getAddedInstallableUnits(), sub.newChild(ExpandWork / 4));
+ projector.encode((IInstallableUnit) updatedPlan[0], (IInstallableUnit[]) updatedPlan[1], profile, profileChangeRequest.getAdditions(), sub.newChild(ExpandWork / 4));
IStatus s = projector.invokeSolver(sub.newChild(ExpandWork / 4));
if (s.getSeverity() == IStatus.CANCEL)
return new ProvisioningPlan(s, profile, context, null);
@@ -347,14 +350,15 @@ public class SimplePlanner implements IPlanner {
}
}
- public IProvisioningPlan getProvisioningPlan(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) {
- if (profileChangeRequest.getAbsolute())
- return generateAbsoluteProvisioningPlan(profileChangeRequest, context, monitor);
+ public IProvisioningPlan getProvisioningPlan(IProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) {
+ ProfileChangeRequest pcr = (ProfileChangeRequest) request;
+ if (pcr.getAbsolute())
+ return generateAbsoluteProvisioningPlan(pcr, context, monitor);
SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
sub.setTaskName(Messages.Director_Task_Resolving_Dependencies);
try {
//Get the solution for the initial request
- Object resolutionResult = getSolutionFor(profileChangeRequest, context, sub.newChild(ExpandWork / 2));
+ Object resolutionResult = getSolutionFor(pcr, context, sub.newChild(ExpandWork / 2));
if (resolutionResult instanceof IProvisioningPlan)
return (ProvisioningPlan) resolutionResult;
@@ -363,12 +367,12 @@ public class SimplePlanner implements IPlanner {
fullState.addAll(newState);
newState = AttachmentHelper.attachFragments(newState.iterator(), ((Projector) resolutionResult).getFragmentAssociation());
- ProvisioningPlan temporaryPlan = generatePlan((Projector) resolutionResult, newState, profileChangeRequest, context);
+ ProvisioningPlan temporaryPlan = generatePlan((Projector) resolutionResult, newState, pcr, context);
//Create a plan for installing necessary pieces to complete the installation (e.g touchpoint actions)
- return createInstallerPlan(profileChangeRequest.getProfile(), profileChangeRequest, fullState, newState, temporaryPlan, context, sub.newChild(ExpandWork / 2));
+ return createInstallerPlan(pcr.getProfile(), pcr, fullState, newState, temporaryPlan, context, sub.newChild(ExpandWork / 2));
} catch (OperationCanceledException e) {
- return new ProvisioningPlan(Status.CANCEL_STATUS, profileChangeRequest.getProfile(), context, null);
+ return new ProvisioningPlan(Status.CANCEL_STATUS, pcr.getProfile(), context, null);
} finally {
sub.done();
}
@@ -377,8 +381,8 @@ public class SimplePlanner implements IPlanner {
private IProvisioningPlan generateAbsoluteProvisioningPlan(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) {
Set<IInstallableUnit> toState = profileChangeRequest.getProfile().query(InstallableUnitQuery.ANY, null).toSet();
HashSet<IInstallableUnit> fromState = new HashSet<IInstallableUnit>(toState);
- toState.removeAll(Arrays.asList(profileChangeRequest.getRemovedInstallableUnits()));
- toState.addAll(Arrays.asList(profileChangeRequest.getAddedInstallableUnits()));
+ toState.removeAll(profileChangeRequest.getRemovals());
+ toState.addAll(profileChangeRequest.getAdditions());
List<InstallableUnitOperand> iuOperands = generateOperations(fromState, toState);
PropertyOperand[] propertyOperands = generatePropertyOperations(profileChangeRequest);
@@ -468,9 +472,9 @@ public class SimplePlanner implements IPlanner {
IInstallableUnit previousActionsIU = getPreviousIUForMetaRequirements(agentProfile, getActionGatheringIUId(targetedProfile), sub);
ProfileChangeRequest agentRequest = new ProfileChangeRequest(agentProfile);
- agentRequest.addInstallableUnits(actionsIU);
+ agentRequest.add(actionsIU);
if (previousActionsIU != null)
- agentRequest.removeInstallableUnit(previousActionsIU);
+ agentRequest.remove(previousActionsIU);
Object externalInstallerPlan = getSolutionFor(agentRequest, initialContext, sub.newChild(10));
if (externalInstallerPlan instanceof IProvisioningPlan && ((IProvisioningPlan) externalInstallerPlan).getStatus().getSeverity() == IStatus.ERROR) {
MultiStatus externalInstallerStatus = new MultiStatus(DirectorActivator.PI_DIRECTOR, 0, Messages.Planner_can_not_install_preq, null);
@@ -485,7 +489,7 @@ public class SimplePlanner implements IPlanner {
//Deal with the case where the actions needs to be installed in the same profile than the one we are performing the initial request
//The expectedState represents the result of the initialRequest where the metaRequirements have been satisfied.
private ProvisioningPlan createInstallerPlanForCohostedCase(IProfile profile, ProfileChangeRequest initialRequest, ProvisioningPlan initialPlan, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, SubMonitor monitor) {
- Collection<IRequirement> metaRequirements = initialRequest.getRemovedInstallableUnits().length == 0 ? areMetaRequirementsSatisfied(profile, expectedState, initialPlan) : extractMetaRequirements(expectedState, initialPlan);
+ Collection<IRequirement> metaRequirements = initialRequest.getRemovals().size() == 0 ? areMetaRequirementsSatisfied(profile, expectedState, initialPlan) : extractMetaRequirements(expectedState, initialPlan);
if (metaRequirements == null || metaRequirements.isEmpty())
return initialPlan;
@@ -510,8 +514,8 @@ public class SimplePlanner implements IPlanner {
}
if (previousMetaRequirementIU != null)
- agentRequest.removeInstallableUnit(previousMetaRequirementIU);
- agentRequest.addInstallableUnits(metaRequirementIU);
+ agentRequest.remove(previousMetaRequirementIU);
+ agentRequest.add(metaRequirementIU);
ProvisioningContext agentCtx = new ProvisioningContext(new URI[0]);
ArrayList<IInstallableUnit> extraIUs = new ArrayList<IInstallableUnit>(unattachedState);
@@ -617,20 +621,20 @@ public class SimplePlanner implements IPlanner {
private Object[] updatePlannerInfo(ProfileChangeRequest profileChangeRequest, ProvisioningContext context) {
IQueryResult<IInstallableUnit> alreadyInstalled = profileChangeRequest.getProfile().query(new IUProfilePropertyQuery(INCLUSION_RULES, null), null);
- IInstallableUnit[] added = profileChangeRequest.getAddedInstallableUnits();
- IInstallableUnit[] removed = profileChangeRequest.getRemovedInstallableUnits();
+ Collection<IInstallableUnit> additionRequested = profileChangeRequest.getAdditions();
+ Collection<IInstallableUnit> removalRequested = profileChangeRequest.getRemovals();
for (Entry<IInstallableUnit, List<String>> object : profileChangeRequest.getInstallableUnitProfilePropertiesToRemove().entrySet()) {
if (object.getValue().contains(INCLUSION_RULES))
profileChangeRequest.setInstallableUnitProfileProperty(object.getKey(), INCLUSION_RULES, PlannerHelper.createStrictInclusionRule(object.getKey()));
}
//Remove the iu properties associated to the ius removed and the iu properties being removed as well
- if (removed.length != 0) {
+ if (removalRequested.size() != 0) {
for (Iterator<IInstallableUnit> iterator = alreadyInstalled.iterator(); iterator.hasNext();) {
IInstallableUnit iu = iterator.next();
- for (int i = 0; i < removed.length; i++) {
- if (iu.equals(removed[i])) {
- profileChangeRequest.removeInstallableUnitProfileProperty(removed[i], INCLUSION_RULES);
+ for (IInstallableUnit removed : removalRequested) {
+ if (iu.equals(removed)) {
+ profileChangeRequest.removeInstallableUnitProfileProperty(removed, INCLUSION_RULES);
iterator.remove();
break;
}
@@ -641,15 +645,15 @@ public class SimplePlanner implements IPlanner {
//Process all the IUs being added
Map<IInstallableUnit, Map<String, String>> iuPropertiesToAdd = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
- for (int i = 0; i < added.length; i++) {
- Map<String, String> propertiesForIU = iuPropertiesToAdd.get(added[i]);
+ for (IInstallableUnit added : additionRequested) {
+ Map<String, String> propertiesForIU = iuPropertiesToAdd.get(added);
IRequirement profileRequirement = null;
if (propertiesForIU != null) {
- profileRequirement = createRequirement(added[i], propertiesForIU.get(INCLUSION_RULES));
+ profileRequirement = createRequirement(added, propertiesForIU.get(INCLUSION_RULES));
}
if (profileRequirement == null) {
- profileChangeRequest.setInstallableUnitProfileProperty(added[i], INCLUSION_RULES, PlannerHelper.createStrictInclusionRule(added[i]));
- profileRequirement = createStrictRequirement(added[i]);
+ profileChangeRequest.setInstallableUnitProfileProperty(added, INCLUSION_RULES, PlannerHelper.createStrictInclusionRule(added));
+ profileRequirement = createStrictRequirement(added);
}
gatheredRequirements.add(profileRequirement);
}
@@ -771,4 +775,9 @@ public class SimplePlanner implements IPlanner {
return profile.query(query, monitor);
}
}
+
+ public IProfileChangeRequest createChangeRequest(IProfile profileToChange) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java
index c0d30f031..c5bc38cf4 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.rollback;
@@ -17,10 +18,11 @@ import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
public class FormerState {
- public static ProfileChangeRequest generateProfileDeltaChangeRequest(IProfile current, IProfile target) {
+ public static IProfileChangeRequest generateProfileDeltaChangeRequest(IProfile current, IProfile target) {
ProfileChangeRequest request = new ProfileChangeRequest(current);
synchronizeProfileProperties(request, current, target);
@@ -30,7 +32,7 @@ public class FormerState {
return request;
}
- private static void synchronizeAllIUProperties(ProfileChangeRequest request, IProfile current, IProfile target) {
+ private static void synchronizeAllIUProperties(IProfileChangeRequest request, IProfile current, IProfile target) {
Set<IInstallableUnit> currentIUset = current.query(InstallableUnitQuery.ANY, null).unmodifiableSet();
Iterator<IInstallableUnit> targetIUs = target.query(InstallableUnitQuery.ANY, null).iterator();
List<IInstallableUnit> iusToAdd = new ArrayList<IInstallableUnit>();
@@ -68,22 +70,22 @@ public class FormerState {
}
}
- private static void synchronizeMarkedIUs(ProfileChangeRequest request, IProfile current, IProfile target) {
- IInstallableUnit[] currentPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(current);
- IInstallableUnit[] targetPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(target);
+ private static void synchronizeMarkedIUs(IProfileChangeRequest request, IProfile current, IProfile target) {
+ Collection<IInstallableUnit> currentPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(current);
+ Collection<IInstallableUnit> targetPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(target);
//additions
- List<IInstallableUnit> markedIUsToAdd = new ArrayList<IInstallableUnit>(Arrays.asList(targetPlannerMarkedIUs));
- markedIUsToAdd.removeAll(Arrays.asList(currentPlannerMarkedIUs));
- request.addInstallableUnits(markedIUsToAdd);
+ Collection<IInstallableUnit> markedIUsToAdd = new HashSet<IInstallableUnit>(targetPlannerMarkedIUs);
+ markedIUsToAdd.removeAll(currentPlannerMarkedIUs);
+ request.addAll(markedIUsToAdd);
// removes
- List<IInstallableUnit> markedIUsToRemove = new ArrayList<IInstallableUnit>(Arrays.asList(currentPlannerMarkedIUs));
- markedIUsToRemove.removeAll(Arrays.asList(targetPlannerMarkedIUs));
- request.removeInstallableUnits(markedIUsToRemove);
+ Collection<IInstallableUnit> markedIUsToRemove = new HashSet<IInstallableUnit>(currentPlannerMarkedIUs);
+ markedIUsToRemove.removeAll(targetPlannerMarkedIUs);
+ request.removeAll(markedIUsToRemove);
}
- private static void synchronizeProfileProperties(ProfileChangeRequest request, IProfile current, IProfile target) {
+ private static void synchronizeProfileProperties(IProfileChangeRequest request, IProfile current, IProfile target) {
Map<String, String> profilePropertiesToSet = new HashMap<String, String>(target.getProperties());
for (Entry<String, String> entry : current.getProperties().entrySet()) {
String key = entry.getKey();
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
index 99cb5438a..9250a0e64 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
* 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.director;
@@ -18,9 +19,9 @@ 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.planner.IProfileChangeRequest;
-public class ProfileChangeRequest implements Cloneable {
+public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
private final IProfile profile;
private ArrayList<IInstallableUnit> iusToRemove = null; // list of ius to remove
@@ -42,9 +43,12 @@ public class ProfileChangeRequest implements Cloneable {
}
public ProfileChangeRequest(IProfile profile) {
+ this.profile = profile;
+ }
+
+ public void setProfile(IProfile profile) {
if (profile == null)
throw new IllegalArgumentException("Profile cannot be null."); //$NON-NLS-1$
- this.profile = profile;
}
public IProfile getProfile() {
@@ -64,28 +68,33 @@ public class ProfileChangeRequest implements Cloneable {
return result;
}
- private void addInstallableUnit(IInstallableUnit toInstall) {
+ //done
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#addInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit)
+ */
+ public void add(IInstallableUnit toInstall) {
if (iusToAdd == null)
iusToAdd = new ArrayList<IInstallableUnit>();
iusToAdd.add(toInstall);
}
- public void addInstallableUnits(Collection<IInstallableUnit> toInstall) {
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#addInstallableUnits(java.util.Collection)
+ */
+ public void addAll(Collection<IInstallableUnit> toInstall) {
for (IInstallableUnit iu : toInstall)
- addInstallableUnit(iu);
- }
-
- public void addInstallableUnits(IQueryResult<IInstallableUnit> toInstall) {
- for (Iterator<IInstallableUnit> itor = toInstall.iterator(); itor.hasNext();)
- addInstallableUnit(itor.next());
+ add(iu);
}
public void addInstallableUnits(IInstallableUnit... toInstall) {
for (int i = 0; i < toInstall.length; i++)
- addInstallableUnit(toInstall[i]);
+ add(toInstall[i]);
}
- public void removeInstallableUnit(IInstallableUnit toUninstall) {
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit)
+ */
+ public void remove(IInstallableUnit toUninstall) {
if (iusToRemove == null)
iusToRemove = new ArrayList<IInstallableUnit>();
iusToRemove.add(toUninstall);
@@ -93,31 +102,38 @@ public class ProfileChangeRequest implements Cloneable {
public void removeInstallableUnits(IInstallableUnit[] toUninstall) {
for (int i = 0; i < toUninstall.length; i++)
- removeInstallableUnit(toUninstall[i]);
+ remove(toUninstall[i]);
}
- public void removeInstallableUnits(Collection<IInstallableUnit> toUninstall) {
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnits(java.util.Collection)
+ */
+ public void removeAll(Collection<IInstallableUnit> toUninstall) {
for (IInstallableUnit iu : toUninstall)
- removeInstallableUnit(iu);
- }
-
- public void removeInstallableUnits(IQueryResult<IInstallableUnit> toUninstall) {
- for (Iterator<IInstallableUnit> itor = toUninstall.iterator(); itor.hasNext();)
- removeInstallableUnit(itor.next());
+ remove(iu);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#setProfileProperty(java.lang.String, java.lang.String)
+ */
public void setProfileProperty(String key, String value) {
if (propertiesToAdd == null)
propertiesToAdd = new HashMap<String, String>();
propertiesToAdd.put(key, value);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeProfileProperty(java.lang.String)
+ */
public void removeProfileProperty(String key) {
if (propertiesToRemove == null)
propertiesToRemove = new ArrayList<String>(1);
propertiesToRemove.add(key);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#setInstallableUnitProfileProperty(org.eclipse.equinox.p2.metadata.IInstallableUnit, java.lang.String, java.lang.String)
+ */
public void setInstallableUnitProfileProperty(IInstallableUnit iu, String key, String value) {
if (iuPropertiesToAdd == null)
iuPropertiesToAdd = new HashMap<IInstallableUnit, Map<String, String>>();
@@ -129,6 +145,9 @@ public class ProfileChangeRequest implements Cloneable {
properties.put(key, value);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnitProfileProperty(org.eclipse.equinox.p2.metadata.IInstallableUnit, java.lang.String)
+ */
public void removeInstallableUnitProfileProperty(IInstallableUnit iu, String key) {
if (iuPropertiesToRemove == null)
iuPropertiesToRemove = new HashMap<IInstallableUnit, List<String>>();
@@ -140,16 +159,19 @@ public class ProfileChangeRequest implements Cloneable {
keys.add(key);
}
- public IInstallableUnit[] getRemovedInstallableUnits() {
+ public Collection<IInstallableUnit> getRemovals() {
if (iusToRemove == null)
- return new IInstallableUnit[0];
- return iusToRemove.toArray(new IInstallableUnit[iusToRemove.size()]);
+ return Collections.emptyList();
+ return Collections.unmodifiableList(iusToRemove);
}
- public IInstallableUnit[] getAddedInstallableUnits() {
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#getAddedInstallableUnits()
+ */
+ public Collection<IInstallableUnit> getAdditions() {
if (iusToAdd == null)
- return new IInstallableUnit[0];
- return iusToAdd.toArray(new IInstallableUnit[iusToAdd.size()]);
+ return Collections.emptyList();
+ return Collections.unmodifiableList(iusToAdd);
}
// String [key, key, key] names of properties to remove
@@ -181,10 +203,16 @@ public class ProfileChangeRequest implements Cloneable {
return iuPropertiesToAdd;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#setInstallableUnitInclusionRules(org.eclipse.equinox.p2.metadata.IInstallableUnit, java.lang.String)
+ */
public void setInstallableUnitInclusionRules(IInstallableUnit iu, String value) {
setInstallableUnitProfileProperty(iu, SimplePlanner.INCLUSION_RULES, value);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnitInclusionRules(org.eclipse.equinox.p2.metadata.IInstallableUnit)
+ */
public void removeInstallableUnitInclusionRules(IInstallableUnit iu) {
removeInstallableUnitProfileProperty(iu, SimplePlanner.INCLUSION_RULES);
}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IPlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java
index 62102574d..64638b84b 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IPlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -7,8 +7,9 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.director;
+package org.eclipse.equinox.p2.planner;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.equinox.p2.engine.*;
@@ -27,10 +28,18 @@ public interface IPlanner {
*/
public static final String SERVICE_NAME = IPlanner.class.getName();
- public IProvisioningPlan getProvisioningPlan(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor);
-
- public IInstallableUnit[] updatesFor(IInstallableUnit toUpdate, ProvisioningContext context, IProgressMonitor monitor);
+ /**
+ *
+ * @param profileChangeRequest the request to be evaluated
+ * @param context the context in which the request is processed
+ * @param monitor a monitor on which planning
+ * @return the plan representing the system that needs to be
+ */
+ public IProvisioningPlan getProvisioningPlan(IProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor);
public IProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor);
+ public IProfileChangeRequest createChangeRequest(IProfile profileToChange);
+
+ public IInstallableUnit[] updatesFor(IInstallableUnit iu, ProvisioningContext context, IProgressMonitor monitor);
}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java
new file mode 100644
index 000000000..05e56d257
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc.
+ * 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:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.planner;
+
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * A profile change request is a description of a set of changes to be performed on a profile.
+ * A profile change request is then
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IProfileChangeRequest {
+
+ /**
+ * Causes the installation of the mentioned IU.
+ * @param toInstall the entity to add to the profile
+ */
+ public abstract void add(IInstallableUnit toInstall);
+
+ /**
+ * Causes the installation of all the IUs mentioned
+ * @param toInstall the installableunits to be added to the profile
+ */
+ public abstract void addAll(Collection<IInstallableUnit> toInstall);
+
+ /**
+ * Causes the removals of all the IUs mentioned
+ * @param toInstall the installableunits to be added to the profile
+ * @param soft indicate whether a attempt to completly remove this IU should be made.
+ */
+ public abstract void remove(IInstallableUnit toUninstall);
+
+ public abstract void removeAll(Collection<IInstallableUnit> toUninstall);
+
+ /**
+ * Associate an inclusion rule with the installable unit. An inclusion rule will dictate whether the
+ * @param iu
+ * @param inclusionRule
+ */
+ public abstract void setInstallableUnitInclusionRules(IInstallableUnit iu, String inclusionRule);
+
+ public abstract void removeInstallableUnitInclusionRules(IInstallableUnit iu);
+
+ // public Object getOptionalInclusionRule();
+ //
+ // public Object getStrictInclusionRule();
+
+ /**
+ * Set a global property on the profile
+ * @param key key of the property
+ * @param value value of the property
+ */
+ public abstract void setProfileProperty(String key, String value);
+
+ /**
+ * Remove a global property on the profile
+ * @param key key of the property
+ * @param value value of the property
+ */
+ public abstract void removeProfileProperty(String key);
+
+ /**
+ * Associate a property with a given IU.
+ * @param key key of the property
+ * @param value value of the property
+ */
+ public abstract void setInstallableUnitProfileProperty(IInstallableUnit iu, String key, String value);
+
+ /**
+ * Remove a property with a given IU.
+ * @param key key of the property
+ * @param value value of the property
+ */
+ public abstract void removeInstallableUnitProfileProperty(IInstallableUnit iu, String key);
+
+ /**
+ * Provide the set of installable units that have been requested for addition
+ * @return a collection of the installable units
+ */
+ public abstract Collection<IInstallableUnit> getAdditions();
+
+ /**
+ * Provide the set of installable units that have been requested for removal
+ * @return a collection of the installable units
+ */
+ public abstract Collection<IInstallableUnit> getRemovals();
+
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
index 989b2482e..043cd24f5 100644
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
+++ b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -8,11 +8,10 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Code 9 - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.installer;
-import org.eclipse.equinox.internal.p2.metadata.VersionedId;
-
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -20,6 +19,7 @@ import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.metadata.VersionedId;
import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
import org.eclipse.equinox.p2.metadata.IVersionedId;
diff --git a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
index 202fe7462..ec638b62d 100644
--- a/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
+++ b/bundles/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Code 9 - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.installer;
@@ -54,7 +55,7 @@ public class InstallUpdateProductOperation implements IInstallOperation {
/**
* Determine what top level installable units should be installed by the director
*/
- private IInstallableUnit[] computeUnitsToInstall() throws CoreException {
+ private Collection<IInstallableUnit> computeUnitsToInstall() throws CoreException {
ArrayList<IInstallableUnit> units = new ArrayList<IInstallableUnit>();
IVersionedId roots[] = installDescription.getRoots();
for (int i = 0; i < roots.length; i++) {
@@ -63,7 +64,7 @@ public class InstallUpdateProductOperation implements IInstallOperation {
if (iu != null)
units.add(iu);
}
- return units.toArray(new IInstallableUnit[units.size()]);
+ return units;
}
/**
@@ -101,20 +102,20 @@ public class InstallUpdateProductOperation implements IInstallOperation {
prepareMetadataRepositories();
prepareArtifactRepositories();
IProfile p = createProfile();
- IInstallableUnit[] toInstall = computeUnitsToInstall();
+ Collection<IInstallableUnit> toInstall = computeUnitsToInstall();
monitor.worked(5);
IStatus s;
ProfileChangeRequest request = new ProfileChangeRequest(p);
if (isInstall) {
monitor.setTaskName(NLS.bind(Messages.Op_Installing, installDescription.getProductName()));
- request.addInstallableUnits(toInstall);
+ request.addAll(toInstall);
s = director.provision(request, null, monitor.newChild(90));
} else {
monitor.setTaskName(NLS.bind(Messages.Op_Updating, installDescription.getProductName()));
IQueryResult<IInstallableUnit> toUninstall = computeUnitsToUninstall(p);
- request.removeInstallableUnits(toUninstall);
- request.addInstallableUnits(toInstall);
+ request.removeAll(toUninstall.toSet());
+ request.addAll(toInstall);
s = director.provision(request, null, monitor.newChild(90));
}
if (!s.isOK())
diff --git a/bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF
index bc438c4b1..3dd60d0f4 100644
--- a/bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF
@@ -21,6 +21,7 @@ Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
org.eclipse.equinox.p2.engine.query,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
org.eclipse.equinox.p2.repository.artifact,
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
index e88b7b466..f1877f040 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
* 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
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.operations;
+import java.util.Collection;
import java.util.Map.Entry;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.provisional.p2.director.*;
@@ -102,27 +104,27 @@ public class PlanAnalyzer {
return report;
if (plan.getStatus().getSeverity() != IStatus.ERROR) {
- IInstallableUnit[] iusAdded = originalRequest.getAddedInstallableUnits();
- for (int i = 0; i < iusAdded.length; i++) {
- RequestStatus rs = plannerStatus.getRequestChanges().get(iusAdded[i]);
+ Collection<IInstallableUnit> iusAdded = originalRequest.getAdditions();
+ for (IInstallableUnit added : iusAdded) {
+ RequestStatus rs = plannerStatus.getRequestChanges().get(added);
if (rs.getSeverity() == IStatus.ERROR) {
// This is a serious error so it must also appear in the overall status
- IStatus fail = new Status(IStatus.ERROR, Activator.ID, IStatusCodes.ALTERED_IGNORED_INSTALL_REQUEST, NLS.bind(Messages.PlanAnalyzer_IgnoringInstall, getIUString(iusAdded[i])), null);
- report.addStatus(iusAdded[i], fail);
+ IStatus fail = new Status(IStatus.ERROR, Activator.ID, IStatusCodes.ALTERED_IGNORED_INSTALL_REQUEST, NLS.bind(Messages.PlanAnalyzer_IgnoringInstall, getIUString(added)), null);
+ report.addStatus(added, fail);
report.addSummaryStatus(fail);
}
}
- IInstallableUnit[] iusRemoved = originalRequest.getRemovedInstallableUnits();
- for (int i = 0; i < iusRemoved.length; i++) {
- RequestStatus rs = plannerStatus.getRequestChanges().get(iusRemoved[i]);
+ Collection<IInstallableUnit> iusRemoved = originalRequest.getRemovals();
+ for (IInstallableUnit removed : iusRemoved) {
+ RequestStatus rs = plannerStatus.getRequestChanges().get(removed);
if (rs.getSeverity() == IStatus.ERROR) {
// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=255984
// We are making assumptions here about why the planner chose to ignore an uninstall.
// Assume it could not be uninstalled because of some other dependency, yet the planner did not view
// this as an error. So we inform the user that we can only uninstall parts of it. The root property will be
// removed per the original change request.
- IStatus fail = new Status(IStatus.INFO, Activator.ID, IStatusCodes.ALTERED_PARTIAL_UNINSTALL, NLS.bind(Messages.PlanAnalyzer_PartialUninstall, getIUString(iusRemoved[i])), null);
- report.addStatus(iusRemoved[i], fail);
+ IStatus fail = new Status(IStatus.INFO, Activator.ID, IStatusCodes.ALTERED_PARTIAL_UNINSTALL, NLS.bind(Messages.PlanAnalyzer_PartialUninstall, getIUString(removed)), null);
+ report.addStatus(removed, fail);
report.addSummaryStatus(fail);
}
}
@@ -154,6 +156,6 @@ public class PlanAnalyzer {
}
private static boolean nothingToDo(ProfileChangeRequest request) {
- return request.getAddedInstallableUnits().length == 0 && request.getRemovedInstallableUnits().length == 0 && request.getInstallableUnitProfilePropertiesToAdd().size() == 0 && request.getInstallableUnitProfilePropertiesToRemove().size() == 0;
+ return request.getAdditions().size() == 0 && request.getRemovals().size() == 0 && request.getInstallableUnitProfilePropertiesToAdd().size() == 0 && request.getInstallableUnitProfilePropertiesToRemove().size() == 0;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
index fa3259a75..61b02019b 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
* 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
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.p2.operations;
+import java.util.Collection;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.operations.*;
import org.eclipse.equinox.internal.provisional.p2.director.PlannerHelper;
@@ -43,7 +45,7 @@ import org.eclipse.equinox.p2.query.IQueryResult;
*/
public class InstallOperation extends ProfileChangeOperation {
- private IInstallableUnit[] toInstall;
+ private Collection<IInstallableUnit> toInstall;
/**
* Create an install operation on the specified provisioning session that installs
@@ -53,7 +55,7 @@ public class InstallOperation extends ProfileChangeOperation {
* @param session the session to use for obtaining provisioning services
* @param toInstall the IInstallableUnits to be installed into the profile.
*/
- public InstallOperation(ProvisioningSession session, IInstallableUnit[] toInstall) {
+ public InstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toInstall) {
super(session);
this.toInstall = toInstall;
}
@@ -66,21 +68,21 @@ public class InstallOperation extends ProfileChangeOperation {
request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
IProfile profile;
profile = session.getProfileRegistry().getProfile(profileId);
- SubMonitor sub = SubMonitor.convert(monitor, Messages.InstallOperation_ComputeProfileChangeProgress, toInstall.length);
- for (int i = 0; i < toInstall.length; i++) {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.InstallOperation_ComputeProfileChangeProgress, toInstall.size());
+ for (IInstallableUnit entryToInstall : toInstall) {
// If the user is installing a patch, we mark it optional. This allows
// the patched IU to be updated later by removing the patch.
- if (PatchQuery.isPatch(toInstall[i]))
- request.setInstallableUnitInclusionRules(toInstall[i], PlannerHelper.createOptionalInclusionRule(toInstall[i]));
+ if (PatchQuery.isPatch(entryToInstall))
+ request.setInstallableUnitInclusionRules(entryToInstall, PlannerHelper.createOptionalInclusionRule(entryToInstall));
// Check to see if it is already installed. This may alter the request.
- IQueryResult<IInstallableUnit> alreadyInstalled = profile.query(new InstallableUnitQuery(toInstall[i].getId()), null);
+ IQueryResult<IInstallableUnit> alreadyInstalled = profile.query(new InstallableUnitQuery(entryToInstall.getId()), null);
// TODO ideally we should only do this check if the iu is a singleton, but in practice many iu's that should
// be singletons are not, so we don't check this (yet)
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=230878
if (!alreadyInstalled.isEmpty()) { // && installedIU.isSingleton()
IInstallableUnit installedIU = alreadyInstalled.iterator().next();
- int compareTo = toInstall[i].getVersion().compareTo(installedIU.getVersion());
+ int compareTo = entryToInstall.getVersion().compareTo(installedIU.getVersion());
// If the iu is a newer version of something already installed, consider this an
// update request
if (compareTo > 0) {
@@ -91,37 +93,37 @@ public class InstallOperation extends ProfileChangeOperation {
if (lockedForUpdate) {
// Add a status telling the user that this implies an update, but the
// iu should not be updated
- status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE, toInstall[i]));
+ status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE, entryToInstall));
} else {
- request.addInstallableUnits(toInstall[i]);
- request.removeInstallableUnit(installedIU);
+ request.add(entryToInstall);
+ request.remove(installedIU);
// Add a status informing the user that the update has been inferred
- status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, toInstall[i]));
+ status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, entryToInstall));
// Mark it as a root if it hasn't been already
if (!UserVisibleRootQuery.isUserVisible(installedIU, profile))
- request.setInstallableUnitProfileProperty(toInstall[i], IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+ request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
}
} else if (compareTo < 0) {
// An implied downgrade. We will not put this in the plan, add a status informing the user
- status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE, toInstall[i]));
+ status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE, entryToInstall));
} else {
// if (rootMarkerKey != null) {
if (UserVisibleRootQuery.isUserVisible(installedIU, profile))
// It is already a root, nothing to do. We tell the user it was already installed
- status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED, toInstall[i]));
+ status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED, entryToInstall));
else {
// It was already installed but not as a root. Tell the user that parts of it are already installed and mark
// it as a root.
- status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_PARTIAL_INSTALL, toInstall[i]));
- request.setInstallableUnitProfileProperty(toInstall[i], IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+ status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_PARTIAL_INSTALL, entryToInstall));
+ request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
}
// }
}
} else {
// Install it and mark as a root
- request.addInstallableUnits(new IInstallableUnit[] {toInstall[i]});
+ request.add(entryToInstall);
// if (rootMarkerKey != null)
- request.setInstallableUnitProfileProperty(toInstall[i], IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+ request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
}
sub.worked(1);
}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java
index c292dba54..1e99ea08e 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
* 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
@@ -7,10 +7,13 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.p2.operations;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.IOException;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -20,7 +23,6 @@ import org.eclipse.equinox.internal.p2.engine.PhaseSet;
import org.eclipse.equinox.internal.p2.operations.*;
import org.eclipse.equinox.internal.provisional.configurator.Configurator;
import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.core.IAgentLocation;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
@@ -217,7 +219,7 @@ public class ProvisioningSession {
// we will be able to get everything else.
ProfileChangeRequest downloadRequest = new ProfileChangeRequest(profile);
downloadRequest.setAbsoluteMode(true);
- downloadRequest.addInstallableUnits(new CompoundQueryable<IInstallableUnit>(plan.getAdditions(), plan.getInstallerPlan().getAdditions()).query(InstallableUnitQuery.ANY, null));
+ downloadRequest.addAll(new CompoundQueryable<IInstallableUnit>(plan.getAdditions(), plan.getInstallerPlan().getAdditions()).query(InstallableUnitQuery.ANY, null).toSet());
PhaseSet download = new DownloadPhaseSet();
IProvisioningPlan downloadPlan = getPlanner().getProvisioningPlan(downloadRequest, context, mon.newChild(100));
@@ -301,17 +303,17 @@ public class ProvisioningSession {
*
* @return an array of IInstallableUnits installed in the profile.
*/
- public IInstallableUnit[] getInstalledIUs(String profileId, boolean all) {
+ public Collection<IInstallableUnit> getInstalledIUs(String profileId, boolean all) {
IProfile profile = getProfileRegistry().getProfile(profileId);
if (profile == null)
- return new IInstallableUnit[0];
+ return Collections.EMPTY_LIST;
IQuery<IInstallableUnit> query;
if (all)
query = InstallableUnitQuery.ANY;
else
query = new UserVisibleRootQuery();
IQueryResult<IInstallableUnit> queryResult = profile.query(query, null);
- return queryResult.toArray(IInstallableUnit.class);
+ return queryResult.toSet();
}
}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java
index cafb8e8ed..09a526f65 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
* 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
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.p2.operations;
+import java.util.Collection;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.equinox.internal.p2.operations.Messages;
@@ -37,7 +39,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit;
*/
public class UninstallOperation extends ProfileChangeOperation {
- private IInstallableUnit[] toUninstall;
+ private Collection<IInstallableUnit> toUninstall;
/**
* Create an uninstall operation on the specified provisioning session that uninstalls
@@ -47,7 +49,7 @@ public class UninstallOperation extends ProfileChangeOperation {
* @param session the session to use for obtaining provisioning services
* @param toUninstall the IInstallableUnits to be installed into the profile.
*/
- public UninstallOperation(ProvisioningSession session, IInstallableUnit[] toUninstall) {
+ public UninstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toUninstall) {
super(session);
this.toUninstall = toUninstall;
}
@@ -57,14 +59,15 @@ public class UninstallOperation extends ProfileChangeOperation {
*/
protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
- request.removeInstallableUnits(toUninstall);
+ request.removeAll(toUninstall);
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=255984
// We ask to remove the the profile root property in addition to removing the IU. In theory this
// should be redundant, but there are cases where the planner decides not to uninstall something because
// it is needed by others. We still want to remove the root in this case.
// if (rootMarkerKey != null)
- for (int i = 0; i < toUninstall.length; i++)
- request.removeInstallableUnitProfileProperty(toUninstall[i], IProfile.PROP_PROFILE_ROOT_IU);
+ for (IInstallableUnit iuToUninstall : toUninstall) {
+ request.removeInstallableUnitProfileProperty(iuToUninstall, IProfile.PROP_PROFILE_ROOT_IU);
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
index 210b6668e..d630377a3 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
* 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.p2.operations;
@@ -60,7 +61,7 @@ import org.eclipse.equinox.p2.query.IQueryResult;
*/
public class UpdateOperation extends ProfileChangeOperation {
- private IInstallableUnit[] iusToUpdate;
+ private Collection<IInstallableUnit> iusToUpdate;
private HashMap<IInstallableUnit, List<Update>> possibleUpdatesByIU = new HashMap<IInstallableUnit, List<Update>>();
private List<Update> defaultUpdates;
@@ -72,7 +73,7 @@ public class UpdateOperation extends ProfileChangeOperation {
* @param session the session to use for obtaining provisioning services
* @param toBeUpdated the IInstallableUnits to be updated.
*/
- public UpdateOperation(ProvisioningSession session, IInstallableUnit[] toBeUpdated) {
+ public UpdateOperation(ProvisioningSession session, Collection<IInstallableUnit> toBeUpdated) {
super(session);
this.iusToUpdate = toBeUpdated;
}
@@ -165,12 +166,12 @@ public class UpdateOperation extends ProfileChangeOperation {
if (profile == null)
return;
- SubMonitor sub = SubMonitor.convert(monitor, Messages.UpdateOperation_ProfileChangeRequestProgress, 100 * iusToUpdate.length);
- for (int i = 0; i < iusToUpdate.length; i++) {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.UpdateOperation_ProfileChangeRequestProgress, 100 * iusToUpdate.size());
+ for (IInstallableUnit iuToUpdate : iusToUpdate) {
SubMonitor iuMon = sub.newChild(100);
- Update[] updates = updatesFor(iusToUpdate[i], profile, iuMon);
+ Update[] updates = updatesFor(iuToUpdate, profile, iuMon);
for (int j = 0; j < updates.length; j++) {
- toBeUpdated.add(iusToUpdate[i]);
+ toBeUpdated.add(iuToUpdate);
if (defaultUpdates != null && defaultUpdates.contains(updates[j])) {
elementsToPlan.add(updates[j]);
}
@@ -209,7 +210,7 @@ public class UpdateOperation extends ProfileChangeOperation {
for (String id : keys) {
// Get rid of things keyed by a different id. We've already made sure
// that updates with a different id are keyed under the original id
- if (!id.equals(iusToUpdate[i].getId())) {
+ if (!id.equals(iuToUpdate.getId())) {
latestVersions.remove(id);
}
}
@@ -235,12 +236,12 @@ public class UpdateOperation extends ProfileChangeOperation {
if (!defaultUpdates.contains(update))
defaultUpdates.add(update);
}
- request.addInstallableUnits(theUpdate);
+ request.add(theUpdate);
request.setInstallableUnitProfileProperty(theUpdate, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
if (PatchQuery.isPatch(theUpdate)) {
request.setInstallableUnitInclusionRules(theUpdate, PlannerHelper.createOptionalInclusionRule(theUpdate));
} else {
- request.removeInstallableUnit(update.toUpdate);
+ request.remove(update.toUpdate);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
index 585a0c561..4e1d228ec 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
@@ -25,6 +25,7 @@ Import-Package: org.eclipse.equinox.app;version="1.0.0",
org.eclipse.equinox.p2.engine.query,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
org.eclipse.equinox.p2.repository.artifact,
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index 4fd85cb23..425443425 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -5,10 +5,13 @@
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial implementation and ideas
+ * IBM Corporation - initial implementation and ideas
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.reconciler.dropins;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -352,8 +355,8 @@ public class ProfileSynchronizer {
}
context.setExtraIUs(toAdd);
- request.addInstallableUnits(toAdd.toArray(new IInstallableUnit[toAdd.size()]));
- request.removeInstallableUnits(toRemove.toArray(new IInstallableUnit[toRemove.size()]));
+ request.addAll(toAdd);
+ request.removeAll(toRemove);
debug(request);
return request;
}
@@ -363,10 +366,8 @@ public class ProfileSynchronizer {
return;
final String PREFIX = "[reconciler] [plan] "; //$NON-NLS-1$
// get the request
- List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>();
- toAdd.addAll(Arrays.asList(request.getAddedInstallableUnits()));
- List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>();
- toRemove.addAll(Arrays.asList(request.getRemovedInstallableUnits()));
+ List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>(request.getAdditions());
+ List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>(request.getRemovals());
// remove from the request everything what is in the plan
Operand[] ops = plan.getOperands();
for (int i = 0; i < ops.length; i++) {
@@ -400,12 +401,12 @@ public class ProfileSynchronizer {
if (!Tracing.DEBUG_RECONCILER)
return;
final String PREFIX = "[reconciler] "; //$NON-NLS-1$
- IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
- if (toAdd == null || toAdd.length == 0) {
+ Collection<IInstallableUnit> toAdd = request.getAdditions();
+ if (toAdd == null || toAdd.size() == 0) {
Tracing.debug(PREFIX + "No installable units to add."); //$NON-NLS-1$
} else {
- for (int i = 0; i < toAdd.length; i++) {
- Tracing.debug(PREFIX + "Adding IU: " + toAdd[i].getId() + ' ' + toAdd[i].getVersion()); //$NON-NLS-1$
+ for (IInstallableUnit add : toAdd) {
+ Tracing.debug(PREFIX + "Adding IU: " + add.getId() + ' ' + add.getVersion()); //$NON-NLS-1$
}
}
Map<IInstallableUnit, Map<String, String>> propsToAdd = request.getInstallableUnitProfilePropertiesToAdd();
@@ -417,12 +418,12 @@ public class ProfileSynchronizer {
}
}
- IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
- if (toRemove == null || toRemove.length == 0) {
+ Collection<IInstallableUnit> toRemove = request.getRemovals();
+ if (toRemove == null || toRemove.size() == 0) {
Tracing.debug(PREFIX + "No installable units to remove."); //$NON-NLS-1$
} else {
- for (int i = 0; i < toRemove.length; i++) {
- Tracing.debug(PREFIX + "Removing IU: " + toRemove[i].getId() + ' ' + toRemove[i].getVersion()); //$NON-NLS-1$
+ for (IInstallableUnit remove : toRemove) {
+ Tracing.debug(PREFIX + "Removing IU: " + remove.getId() + ' ' + remove.getVersion()); //$NON-NLS-1$
}
}
Map<IInstallableUnit, List<String>> propsToRemove = request.getInstallableUnitProfilePropertiesToRemove();
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
index 085047911..0f798888d 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
@@ -31,6 +31,7 @@ Import-Package: org.eclipse.core.runtime;version="3.4.0",
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.expression,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.publisher.eclipse,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
index 7649146b3..77ae5878b 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
* 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
@@ -7,9 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -17,7 +20,6 @@ import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.equinox.internal.p2.engine.*;
import org.eclipse.equinox.internal.p2.engine.phases.Collect;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
@@ -125,7 +127,7 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
try {
ProfileChangeRequest request = new ProfileChangeRequest(profile);
request.setAbsoluteMode(true);
- request.addInstallableUnits(processedIUs.toArray(new IInstallableUnit[processedIUs.size()]));
+ request.addAll(processedIUs);
ProvisioningContext context = new ProvisioningContext();
IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
if (engine == null)
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/.classpath b/bundles/org.eclipse.equinox.p2.tests.ui/.classpath
index 2fbb7a23e..64c5e31b7 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/.classpath
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs
index b4fdaeb4b..ba7bd9ea6 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Aug 19 22:58:53 EDT 2008
+#Mon Feb 08 20:27:19 EST 2010
eclipse.preferences.version=1
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
@@ -8,24 +8,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -85,7 +85,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
index 36f1650b0..ee642ddbf 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.equinox.p2.tests.ui
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.100",
org.eclipse.ui;bundle-version="3.5.0",
org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
index 227c0952c..185a9deb8 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
@@ -114,7 +114,7 @@ public abstract class AbstractProvisioningUITest extends AbstractProvisioningTes
protected IStatus install(IInstallableUnit iu, boolean root, boolean lock) throws ProvisionException {
ProfileChangeRequest req = new ProfileChangeRequest(profile);
- req.addInstallableUnits(new IInstallableUnit[] {iu});
+ req.add(iu);
if (root) {
req.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
index cd2110a96..f895ccd5e 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
@@ -35,27 +35,27 @@ import org.eclipse.ui.PlatformUI;
public class ElementUtilsTest extends ProfileModificationActionTest {
public void testEmpty() {
- assertEquals(getEmptySelection().length, ElementUtils.elementsToIUs(getEmptySelection()).length);
+ assertEquals(getEmptySelection().length, ElementUtils.elementsToIUs(getEmptySelection()).size());
}
public void testInvalid() {
- assertTrue(ElementUtils.elementsToIUs(getInvalidSelection()).length == 0);
+ assertTrue(ElementUtils.elementsToIUs(getInvalidSelection()).size() == 0);
}
public void testIUs() {
- assertEquals(getTopLevelIUs().length, ElementUtils.elementsToIUs(getTopLevelIUs()).length);
+ assertEquals(getTopLevelIUs().length, ElementUtils.elementsToIUs(getTopLevelIUs()).size());
}
public void testElements() {
- assertEquals(getTopLevelIUElements().length, ElementUtils.elementsToIUs(getTopLevelIUElements()).length);
+ assertEquals(getTopLevelIUElements().length, ElementUtils.elementsToIUs(getTopLevelIUElements()).size());
}
public void testMixedIUsAndNonIUs() {
- assertTrue(getMixedIUsAndNonIUs().length != ElementUtils.elementsToIUs(getMixedIUsAndNonIUs()).length);
+ assertTrue(getMixedIUsAndNonIUs().length != ElementUtils.elementsToIUs(getMixedIUsAndNonIUs()).size());
}
public void testMixedIUsAndElements() {
- assertEquals(getMixedIUsAndElements().length, ElementUtils.elementsToIUs(getMixedIUsAndElements()).length);
+ assertEquals(getMixedIUsAndElements().length, ElementUtils.elementsToIUs(getMixedIUsAndElements()).size());
}
public void testUpdateUsingElements() throws URISyntaxException {
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java
index aea471405..0091e6ae4 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java
@@ -11,6 +11,7 @@
package org.eclipse.equinox.p2.tests.ui.actions;
+import java.util.List;
import org.eclipse.equinox.internal.p2.ui.actions.InstallAction;
import org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement;
import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
@@ -27,7 +28,7 @@ public class InstallActionTest extends ProfileModificationActionTest {
super(InstallActionTest.this.getProvisioningUI(), InstallActionTest.this.getSelectionProvider(sel), profile.getProfileId());
}
- public IInstallableUnit[] getSelectedIUs() {
+ public List<IInstallableUnit> getSelectedIUs() {
return super.getSelectedIUs();
}
}
@@ -35,45 +36,45 @@ public class InstallActionTest extends ProfileModificationActionTest {
public void testEmptySelection() {
TestInstallAction action = new TestInstallAction(getEmptySelection());
assertFalse("Should not be enabled with empty selection", action.isEnabled());
- assertEquals(0, action.getSelectedIUs().length);
+ assertEquals(0, action.getSelectedIUs().size());
}
public void testIUs() {
TestInstallAction action = new TestInstallAction(getTopLevelIUs());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testElements() {
TestInstallAction action = new TestInstallAction(getTopLevelIUElements());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testMixedIUsAndNonIUs() {
TestInstallAction action = new TestInstallAction(getMixedIUsAndNonIUs());
assertTrue("Mixed selections allowed", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testMixedIUsAndElements() {
TestInstallAction action = new TestInstallAction(getMixedIUsAndElements());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testParentIsCategory() {
TestInstallAction action = new TestInstallAction(getCategoryAndChildIUElements());
assertTrue("Should be enabled", action.isEnabled());
// Only the non-category should be considered a selection
- assertEquals(1, action.getSelectedIUs().length);
+ assertEquals(1, action.getSelectedIUs().size());
}
public void testParentIsNestedCategory() {
TestInstallAction action = new TestInstallAction(getNestedCategoriesAndChildIUElements());
assertTrue("Should be enabled", action.isEnabled());
// Only the non-category should be considered a selection
- assertEquals(1, action.getSelectedIUs().length);
+ assertEquals(1, action.getSelectedIUs().size());
}
protected IIUElement element(IInstallableUnit iu) {
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java
index 8a7f9d9aa..9aaf340b2 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java
@@ -11,6 +11,7 @@
package org.eclipse.equinox.p2.tests.ui.actions;
+import java.util.List;
import org.eclipse.equinox.internal.p2.ui.actions.UninstallAction;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -24,7 +25,7 @@ public class UninstallActionTest extends ProfileModificationActionTest {
super(UninstallActionTest.this.getProvisioningUI(), UninstallActionTest.this.getSelectionProvider(sel), profile.getProfileId());
}
- public IInstallableUnit[] getSelectedIUs() {
+ public List<IInstallableUnit> getSelectedIUs() {
return super.getSelectedIUs();
}
}
@@ -32,54 +33,54 @@ public class UninstallActionTest extends ProfileModificationActionTest {
public void testLockedElements() {
TestUninstallAction action = new TestUninstallAction(getTopLevelIUElementsWithLockedIU());
assertFalse("Should not be enabled with locked elements", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testLockedIUs() {
TestUninstallAction action = new TestUninstallAction(getTopLevelIUsWithLockedIU());
assertFalse("Should not be enabled with locked ius", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testEmptySelection() {
TestUninstallAction action = new TestUninstallAction(getEmptySelection());
assertFalse("Should not be enabled with empty selection", action.isEnabled());
- assertEquals(0, action.getSelectedIUs().length);
+ assertEquals(0, action.getSelectedIUs().size());
}
public void testTopLevelIUs() {
TestUninstallAction action = new TestUninstallAction(getTopLevelIUs());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testTopLevelElements() {
TestUninstallAction action = new TestUninstallAction(getTopLevelIUElements());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testNestedIUs() {
TestUninstallAction action = new TestUninstallAction(getMixedIUs());
assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testNestedElements() {
TestUninstallAction action = new TestUninstallAction(getMixedIUElements());
assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testMixedIUsAndNonIUs() {
TestUninstallAction action = new TestUninstallAction(getMixedIUsAndNonIUs());
assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testMixedIUsAndElements() {
TestUninstallAction action = new TestUninstallAction(getMixedIUsAndElements());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java
index fa3ca5e56..66d36c331 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java
@@ -11,6 +11,7 @@
package org.eclipse.equinox.p2.tests.ui.actions;
+import java.util.List;
import org.eclipse.equinox.internal.p2.ui.actions.UpdateAction;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -24,7 +25,7 @@ public class UpdateActionTest extends ProfileModificationActionTest {
super(UpdateActionTest.this.getProvisioningUI(), UpdateActionTest.this.getSelectionProvider(sel), profile.getProfileId(), true);
}
- public IInstallableUnit[] getSelectedIUs() {
+ public List<IInstallableUnit> getSelectedIUs() {
return super.getSelectedIUs();
}
}
@@ -32,54 +33,54 @@ public class UpdateActionTest extends ProfileModificationActionTest {
public void testLockedElements() {
TestUpdateAction action = new TestUpdateAction(getTopLevelIUElementsWithLockedIU());
assertFalse("Should not be enabled with locked elements", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testLockedIUs() {
TestUpdateAction action = new TestUpdateAction(getTopLevelIUsWithLockedIU());
assertFalse("Should not be enabled with locked ius", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testEmptySelection() {
TestUpdateAction action = new TestUpdateAction(getEmptySelection());
assertFalse("Should not be enabled with empty selection", action.isEnabled());
- assertEquals(0, action.getSelectedIUs().length);
+ assertEquals(0, action.getSelectedIUs().size());
}
public void testTopLevelIUs() {
TestUpdateAction action = new TestUpdateAction(getTopLevelIUs());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testTopLevelElements() {
TestUpdateAction action = new TestUpdateAction(getTopLevelIUElements());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testNestedIUs() {
TestUpdateAction action = new TestUpdateAction(getMixedIUs());
assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testNestedElements() {
TestUpdateAction action = new TestUpdateAction(getMixedIUElements());
assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testMixedIUsAndNonIUs() {
TestUpdateAction action = new TestUpdateAction(getMixedIUsAndNonIUs());
assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
public void testMixedIUsAndElements() {
TestUpdateAction action = new TestUpdateAction(getMixedIUsAndElements());
assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().length);
+ assertEquals(2, action.getSelectedIUs().size());
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java
index 107e3ec19..e51e97204 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java
@@ -10,20 +10,15 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.dialogs;
-import org.eclipse.equinox.p2.metadata.Version;
-
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
-
-import org.eclipse.equinox.p2.metadata.ILicense;
-
+import java.util.ArrayList;
import org.eclipse.equinox.internal.p2.metadata.License;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.operations.InstallOperation;
import org.eclipse.equinox.p2.operations.ProfileModificationJob;
import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
@@ -58,9 +53,11 @@ public class InstallWizardTest extends WizardTest {
}
public void testInstallWizardResolved() {
- InstallOperation op = new InstallOperation(getSession(), new IInstallableUnit[] {toInstall});
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(toInstall);
+ InstallOperation op = new InstallOperation(getSession(), iusInvolved);
op.setProfileId(TESTPROFILE);
- PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, new IInstallableUnit[] {toInstall}, null);
+ PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
dialog.setBlockOnOpen(false);
dialog.open();
@@ -121,7 +118,7 @@ public class InstallWizardTest extends WizardTest {
AvailableIUsPage page1 = (AvailableIUsPage) wizard.getPage(AVAILABLE_SOFTWARE_PAGE);
// test initial wizard state
- assertTrue("1.0", page1.getSelectedIUs().length == 0);
+ assertTrue("1.0", page1.getSelectedIUs().size() == 0);
assertFalse("1.1", page1.isPageComplete());
// Start reaching in...
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java
index 079a8bccc..eb26d3d29 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.dialogs;
+import java.util.ArrayList;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -30,8 +31,9 @@ public class UninstallWizardTest extends WizardTest {
* This is the normal SDK workflow.
*/
public void testUninstallWizardResolved() {
-
- IInstallableUnit[] iusInvolved = new IInstallableUnit[] {top1, top2};
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(top1);
+ iusInvolved.add(top2);
UninstallOperation op = getProvisioningUI().getUninstallOperation(iusInvolved, null);
op.resolveModal(getMonitor());
UninstallWizard wizard = new UninstallWizard(getProvisioningUI(), op, iusInvolved, null);
@@ -71,8 +73,11 @@ public class UninstallWizardTest extends WizardTest {
*/
public void testUninstallWizardUnresolved() {
// This test is pretty useless right now but at least it opens the wizard
- UninstallOperation operation = getProvisioningUI().getUninstallOperation(new IInstallableUnit[] {top1, top2}, null);
- UninstallWizard wizard = new UninstallWizard(getProvisioningUI(), operation, new IInstallableUnit[] {top1, top2}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(top1);
+ iusInvolved.add(top2);
+ UninstallOperation operation = getProvisioningUI().getUninstallOperation(iusInvolved, null);
+ UninstallWizard wizard = new UninstallWizard(getProvisioningUI(), operation, iusInvolved, null);
WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
dialog.setBlockOnOpen(false);
dialog.create();
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
index b8eba8582..1a77c7ca8 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.dialogs;
+import java.util.ArrayList;
import org.eclipse.equinox.internal.p2.metadata.License;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.dialogs.*;
@@ -64,7 +65,9 @@ public class UpdateWizardTest extends WizardTest {
* This is the SDK
*/
public void testUpdateWizardResolved() {
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {main}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(main);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), op, op.getSelectedUpdates(), null);
WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
@@ -97,7 +100,9 @@ public class UpdateWizardTest extends WizardTest {
}
public void testUpdateWizardResolvedWithLicense() {
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {main}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(main);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), op, op.getSelectedUpdates(), null);
ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
@@ -128,7 +133,9 @@ public class UpdateWizardTest extends WizardTest {
* Tests the wizard when a prior resolution has been done, but is in error.
*/
public void testUpdateWizardResolvedError() {
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {main}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(main);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
op.setSelectedUpdates(op.getPossibleUpdates());
UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), op, op.getSelectedUpdates(), null);
@@ -148,7 +155,9 @@ public class UpdateWizardTest extends WizardTest {
* directly on the resolution page
*/
public void testUpdateWizardResolvedSkipSelections() {
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {main}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(main);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), op, op.getSelectedUpdates(), null);
wizard.setSkipSelectionsPage(true);
@@ -168,8 +177,9 @@ public class UpdateWizardTest extends WizardTest {
* Tests the wizard when multiple versions are available.
*/
public void testBug277554MultipleVersions() {
-
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {main}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(main);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
UpdateWizard wizard = new UpdateWizard(getProvisioningUI(), op, op.getSelectedUpdates(), null);
ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java
index 8b605be07..a740e891e 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java
@@ -39,7 +39,7 @@ public class SizingTest extends AbstractProvisioningUITest {
String profileId = "testSimpleSizing";
IProfile testProfile = createProfile(profileId);
ProfileChangeRequest request = new ProfileChangeRequest(testProfile);
- request.addInstallableUnits(new IInstallableUnit[] {f1});
+ request.add(f1);
IProvisioningPlan plan = null;
plan = getSession().getPlanner().getProvisioningPlan(request, new ProvisioningContext(), getMonitor());
long size = ProvisioningSession.SIZE_NOTAPPLICABLE;
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java
index 7e4260c42..bb854f395 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/planning/UpdatePlanning.java
@@ -10,7 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.planning;
-import java.util.Arrays;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+
+import java.util.ArrayList;
import java.util.HashSet;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
@@ -56,19 +58,23 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
public void testChooseUpdateOverPatch() throws ProvisionException {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {a1}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
ProfileChangeRequest request = op.getProfileChangeRequest();
- assertTrue("1.0", request.getAddedInstallableUnits().length == 1);
- assertTrue("1.1", request.getAddedInstallableUnits()[0].equals(a130));
- assertTrue("1.2", request.getRemovedInstallableUnits().length == 1);
- assertTrue("1.3", request.getRemovedInstallableUnits()[0].equals(a1));
+ assertTrue("1.0", request.getAdditions().size() == 1);
+ assertTrue("1.1", request.getAdditions().iterator().next().equals(a130));
+ assertTrue("1.2", request.getRemovals().size() == 1);
+ assertTrue("1.3", request.getRemovals().iterator().next().equals(a1));
}
public void testForcePatchOverUpdate() throws ProvisionException {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {a1}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
Update[] updates = op.getPossibleUpdates();
Update firstPatch = null;
@@ -82,21 +88,23 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
op.setSelectedUpdates(new Update[] {firstPatch});
op.resolveModal(getMonitor());
ProfileChangeRequest request = op.getProfileChangeRequest();
- assertTrue("1.0", request.getAddedInstallableUnits().length == 1);
- assertTrue("1.1", request.getAddedInstallableUnits()[0].equals(firstPatchForA1));
- assertTrue("1.2", request.getRemovedInstallableUnits().length == 0);
+ assertTrue("1.0", request.getAdditions().size() == 1);
+ assertTrue("1.1", request.getAdditions().iterator().next().equals(firstPatchForA1));
+ assertTrue("1.2", request.getRemovals().size() == 0);
}
public void testRecognizePatchIsInstalled() throws ProvisionException {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
install(firstPatchForA1, true, false);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {a1}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
- ProfileChangeRequest request = op.getProfileChangeRequest();
+ IProfileChangeRequest request = op.getProfileChangeRequest();
// update was favored, that would happen even if patch was not installed
- assertTrue("1.0", request.getAddedInstallableUnits().length == 1);
- assertTrue("1.1", request.getAddedInstallableUnits()[0].equals(a130));
+ assertTrue("1.0", request.getAdditions().size() == 1);
+ assertTrue("1.1", request.getAdditions().iterator().next().equals(a130));
// the patch is not being shown to the user because we figured out it was already installed
// The elements showing are a130 and a120WithDifferentId
assertEquals("1.2", 2, op.getPossibleUpdates().length);
@@ -105,7 +113,9 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
public void testChooseNotTheNewest() throws ProvisionException {
createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
install(a1, true, false);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {a1}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
Update[] updates = op.getPossibleUpdates();
Update notNewest = null;
@@ -118,10 +128,10 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
assertNotNull(".99", notNewest);
op.setSelectedUpdates(new Update[] {notNewest});
op.resolveModal(getMonitor());
- ProfileChangeRequest request = op.getProfileChangeRequest();
+ IProfileChangeRequest request = op.getProfileChangeRequest();
// selected was favored
- assertTrue("1.0", request.getAddedInstallableUnits().length == 1);
- assertTrue("1.1", request.getAddedInstallableUnits()[0].equals(a120WithDifferentId));
+ assertTrue("1.0", request.getAdditions().size() == 1);
+ assertTrue("1.1", request.getAdditions().iterator().next().equals(a120WithDifferentId));
// The two updates and the patch were recognized
assertEquals("1.2", 3, op.getPossibleUpdates().length);
}
@@ -129,13 +139,15 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
public void testChooseLatestPatches() throws ProvisionException {
createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1});
install(a1, true, false);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {a1}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
- ProfileChangeRequest request = op.getProfileChangeRequest();
+ IProfileChangeRequest request = op.getProfileChangeRequest();
// the latest two patches were selected
HashSet chosen = new HashSet();
- assertTrue("1.0", request.getAddedInstallableUnits().length == 2);
- chosen.addAll(Arrays.asList(request.getAddedInstallableUnits()));
+ assertTrue("1.0", request.getAdditions().size() == 2);
+ chosen.addAll(request.getAdditions());
assertTrue("1.1", chosen.contains(secondPatchForA1));
assertTrue("1.2", chosen.contains(thirdPatchForA1));
@@ -145,12 +157,14 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
public void testLatestHasDifferentId() throws ProvisionException {
createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1, a120WithDifferentId, a130, a140WithDifferentId});
install(a1, true, false);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {a1}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
- ProfileChangeRequest request = op.getProfileChangeRequest();
+ IProfileChangeRequest request = op.getProfileChangeRequest();
// update 140 was recognized as the latest even though it had a different id
- assertTrue("1.0", request.getAddedInstallableUnits().length == 1);
- assertTrue("1.1", request.getAddedInstallableUnits()[0].equals(a140WithDifferentId));
+ assertTrue("1.0", request.getAdditions().size() == 1);
+ assertTrue("1.1", request.getAdditions().iterator().next().equals(a140WithDifferentId));
// All three patches and all three updates can be chosen
assertEquals("1.2", 6, op.getPossibleUpdates().length);
}
@@ -159,7 +173,10 @@ public class UpdatePlanning extends AbstractProvisioningUITest {
public void testRemoveSelectionAfterResolve() throws ProvisionException {
createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
install(a1, true, false);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(new IInstallableUnit[] {a1, b1}, null);
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a1);
+ iusInvolved.add(b1);
+ UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
Update[] updates = op.getSelectedUpdates();
assertEquals("1.0", 2, updates.length);
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
index 064f85a62..3fe46b448 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.query;
+import java.util.ArrayList;
import java.util.HashMap;
import org.eclipse.equinox.internal.p2.ui.model.*;
import org.eclipse.equinox.p2.core.ProvisionException;
@@ -67,7 +68,9 @@ public class QueryProviderTests extends AbstractProvisioningUITest {
IUElementListRoot root = new IUElementListRoot();
AvailableIUElement element = new AvailableIUElement(root, a, TESTPROFILE, getPolicy().getShowDrilldownRequirements());
root.setChildren(new Object[] {element});
- InstallOperation op = new InstallOperation(getSession(), new IInstallableUnit[] {a});
+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ iusInvolved.add(a);
+ InstallOperation op = new InstallOperation(getSession(), iusInvolved);
op.setProfileId(TESTPROFILE);
op.resolveModal(getMonitor());
IQueryable queryable = op.getProvisioningPlan().getAdditions();
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java
index a5d45e9f4..4f2fd7e7e 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java
@@ -43,7 +43,7 @@ public class QueryableArtifactRepositoryManagerTest extends AbstractQueryTest {
public void testQuery() {
QueryableArtifactRepositoryManager manager = getQueryableManager();
- IQueryResult result = manager.query(new RepositoryLocationQuery(), getMonitor());
+ IQueryResult result = manager.locationsQueriable().query(new RepositoryLocationQuery(), getMonitor());
assertTrue(queryResultSize(result) == repoCount);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java
index 8dbf8bf76..1dcda22d3 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java
@@ -184,7 +184,7 @@ public class QueryableMetadataRepositoryManagerTest extends AbstractQueryTest {
// RepoLocationQuery must cause repository URI's to be collected and no repository
// loading should occur.
- result = manager.query(new RepositoryLocationQuery(), getMonitor());
+ result = manager.locationsQueriable().query(new RepositoryLocationQuery(), getMonitor());
assertEquals("2.0", 3, queryResultSize(result));
assertContains("2.1", result, existing);
assertContains("2.1", result, nonExisting);
diff --git a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
index 438d9ea7c..42370fe7d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
@@ -44,6 +44,7 @@ Import-Package: javax.xml.parsers,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.expression,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.ql,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository.artifact.spi,
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
index a3c4f72ad..a4faddda7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/AbstractProvisioningTest.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.*;
import java.lang.reflect.Field;
import java.net.URI;
@@ -963,8 +965,8 @@ public abstract class AbstractProvisioningTest extends TestCase {
protected IStatus install(IProfile profile, IInstallableUnit[] ius, boolean strict, IPlanner planner, IEngine engine) {
ProfileChangeRequest req = new ProfileChangeRequest(profile);
- req.addInstallableUnits(ius);
for (int i = 0; i < ius.length; i++) {
+ req.add(ius[i]);
req.setInstallableUnitInclusionRules(ius[i], strict ? PlannerHelper.createStrictInclusionRule(ius[i]) : PlannerHelper.createOptionalInclusionRule(ius[i]));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryMissingSizeData.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryMissingSizeData.java
index 55a3045af..445f9ee72 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryMissingSizeData.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryMissingSizeData.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.Phase;
@@ -22,6 +20,7 @@ import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
@@ -54,7 +53,7 @@ public class ArtifactRepositoryMissingSizeData extends AbstractProvisioningTest
public void testMissingArtifact() {
IProfile profile1 = createProfile("TestProfile." + getName());
ProfileChangeRequest req = new ProfileChangeRequest(profile1);
- req.addInstallableUnits(new IInstallableUnit[] {missingArtifactIU});
+ req.add(missingArtifactIU);
req.setInstallableUnitInclusionRules(missingArtifactIU, PlannerHelper.createStrictInclusionRule(missingArtifactIU));
IProvisioningPlan plan = createPlanner().getProvisioningPlan(req, null, null);
@@ -72,7 +71,7 @@ public class ArtifactRepositoryMissingSizeData extends AbstractProvisioningTest
public void testMissingSize() {
IProfile profile1 = createProfile("TestProfile." + getName());
ProfileChangeRequest req = new ProfileChangeRequest(profile1);
- req.addInstallableUnits(new IInstallableUnit[] {missingSizeIU});
+ req.add(missingSizeIU);
req.setInstallableUnitInclusionRules(missingSizeIU, PlannerHelper.createStrictInclusionRule(missingSizeIU));
IProvisioningPlan plan = createPlanner().getProvisioningPlan(req, null, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java
index 59be6964a..f12ca78ed 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactRepositoryWithReferenceDescriptors.java
@@ -10,14 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.ByteArrayOutputStream;
import java.io.File;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java
index d93317b0b..987ab16e9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/Bug252308.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.*;
import java.lang.reflect.Method;
import org.eclipse.core.runtime.*;
@@ -19,6 +17,7 @@ import org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MD5Tests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MD5Tests.java
index 04e2db056..ee6e33470 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MD5Tests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MD5Tests.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.util.Iterator;
@@ -19,6 +17,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.artifact.*;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/AutomatedDirectorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/AutomatedDirectorTest.java
index cabde3bcb..62a723640 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/AutomatedDirectorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/AutomatedDirectorTest.java
@@ -58,7 +58,6 @@ public class AutomatedDirectorTest extends AbstractProvisioningTest {
IInstallableUnit toInstallIU = createIU("toInstall." + getName(), new IRequiredCapability[] {capability});
IInstallableUnit[] allUnits = new IInstallableUnit[] {requiredIU, toInstallIU};
- IInstallableUnit[] toInstallArray = new IInstallableUnit[] {toInstallIU};
createTestMetdataRepository(allUnits);
IDirector director = createDirector();
@@ -67,7 +66,7 @@ public class AutomatedDirectorTest extends AbstractProvisioningTest {
properties.put(IProfile.PROP_ENVIRONMENTS, "FilterKey=true");
IProfile satisfied = createProfile("Satisfied." + getName(), properties);
ProfileChangeRequest request = new ProfileChangeRequest(satisfied);
- request.addInstallableUnits(toInstallArray);
+ request.add(toInstallIU);
IStatus result = director.provision(request, null, null);
assertTrue("1.0", result.isOK());
assertProfileContains("1.1", satisfied, allUnits);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/Bug203637.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/Bug203637.java
index 08e3f6fdd..202f8a352 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/Bug203637.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/Bug203637.java
@@ -10,12 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.director;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class Bug203637 extends AbstractProvisioningTest {
@@ -24,7 +23,7 @@ public class Bug203637 extends AbstractProvisioningTest {
IProfile profile = createProfile("TestProfile." + getName());
IInstallableUnit a1 = createIU("A", Version.createOSGi(1, 0, 0), true);
ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.addInstallableUnits(new IInstallableUnit[] {a1});
+ request.add(a1);
request.removeInstallableUnits(new IInstallableUnit[0]);
assertOK("1.0", d.provision(request, null, null));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java
index a1c451d32..ab94f1abe 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java
@@ -10,13 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.director;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.util.*;
import org.eclipse.equinox.internal.p2.director.OperationGenerator;
import org.eclipse.equinox.internal.p2.metadata.ResolvedInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest.java
index 40088c1a0..fd09d53ce 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest.java
@@ -8,15 +8,12 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.director;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class OracleTest extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest2.java
index 11aeff973..abf294f6b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OracleTest2.java
@@ -8,18 +8,14 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.director;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class OracleTest2 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/ReplacePlanTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/ReplacePlanTest.java
index 9efa4f8e3..9cdd322d0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/ReplacePlanTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/ReplacePlanTest.java
@@ -10,14 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.director;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/SingletonTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/SingletonTest.java
index d066a3d16..e89ffef3d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/SingletonTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/SingletonTest.java
@@ -10,14 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.director;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SingletonTest extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/UpdateTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/UpdateTest.java
index cb08ac8f5..673b6985e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/UpdateTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/UpdateTest.java
@@ -8,15 +8,14 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.director;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class UpdateTest extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/ProfileSynchronizerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/ProfileSynchronizerTest.java
index a77f39e67..e4f42710b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/ProfileSynchronizerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/directorywatcher/ProfileSynchronizerTest.java
@@ -10,14 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.directorywatcher;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.util.*;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
/**
* @since 1.0
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ActionManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ActionManagerTest.java
index 2bdf4694d..c145c1c03 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ActionManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ActionManagerTest.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.io.File;
import java.net.MalformedURLException;
import org.eclipse.equinox.internal.p2.engine.ActionManager;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestActivator;
import org.osgi.framework.Bundle;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java
index c37eabce8..f9b197bd6 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/InstructionParserTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.util.List;
import java.util.Map;
import junit.framework.Test;
@@ -23,6 +21,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
import org.eclipse.equinox.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class InstructionParserTest extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java
index a717ac609..fc0a11063 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.equinox.internal.p2.engine.phases.*;
import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java
index 30b6b1d8c..6d544172d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.io.IOException;
import java.util.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
index 8bee0b3ce..3e2c4ea51 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.util.Map;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.engine.PhaseSet;
@@ -20,6 +18,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.Inst
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestActivator;
import org.eclipse.equinox.p2.tests.engine.PhaseTest.TestPhaseSet;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest.java
index 6508f93cf..15369963a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.full;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -26,8 +24,8 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.core.*;
import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/RepoValidator.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/RepoValidator.java
index a6c38f271..56c618143 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/RepoValidator.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/RepoValidator.java
@@ -10,11 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.full;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfile;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java
index 5e11a2f35..95ef9ed92 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java
@@ -8,15 +8,12 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.generator;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import junit.framework.TestCase;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.p2.metadata.generator.features.FeatureParser;
import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Feature;
import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnitPatch;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.PatchQuery;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/installer/InstallDescriptionParserTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/installer/InstallDescriptionParserTest.java
index 5d6e11047..b72e6d969 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/installer/InstallDescriptionParserTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/installer/InstallDescriptionParserTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.installer;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.io.IOException;
import java.net.*;
@@ -19,6 +17,7 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.installer.InstallDescriptionParser;
import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestData;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ArtifactKeyParsingTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ArtifactKeyParsingTest.java
index 0b7e19c85..f4656f4a2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ArtifactKeyParsingTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ArtifactKeyParsingTest.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Test <code>ArtifactkeyDeSerializer</code>
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/FragmentMethodTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/FragmentMethodTest.java
index e6ad021f2..9e4bc43be 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/FragmentMethodTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/FragmentMethodTest.java
@@ -10,18 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.util.*;
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class FragmentMethodTest extends TestCase {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/InstallableUnitTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/InstallableUnitTest.java
index 68d6dd67f..d170092d7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/InstallableUnitTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/InstallableUnitTest.java
@@ -10,13 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/LatestIUTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/LatestIUTest.java
index 8814ae826..8ad4c9ab0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/LatestIUTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/LatestIUTest.java
@@ -9,11 +9,10 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.net.URI;
import org.eclipse.equinox.internal.p2.metadata.query.LatestIUVersionQuery;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/MultipleIUAndFragmentTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/MultipleIUAndFragmentTest.java
index e917893f3..b2d74c2f8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/MultipleIUAndFragmentTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/MultipleIUAndFragmentTest.java
@@ -10,14 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.util.Collection;
import java.util.Iterator;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ProvidedCapabilityTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ProvidedCapabilityTest.java
index 316d64c50..d9648e66c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ProvidedCapabilityTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/ProvidedCapabilityTest.java
@@ -10,10 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java
index d127b2417..6eb5ea559 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/JarURLMetadataRepositoryTest.java
@@ -11,8 +11,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata.repository;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
@@ -23,6 +21,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/LocalMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/LocalMetadataRepositoryTest.java
index 562fd31de..0ed8485f9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/LocalMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/LocalMetadataRepositoryTest.java
@@ -11,20 +11,16 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.metadata.repository;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.net.URI;
import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.IRepository;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatATest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatATest.java
index f7d4d0d74..2254e2516 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatATest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatATest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests the format(a) rule.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatArrayTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatArrayTest.java
index 5a2afa83b..964a60ec0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatArrayTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatArrayTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests format(<>) - arrays.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java
index 566bf1b95..498523e86 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatDTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests format(d) and explicit delimiter chars and strings.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatNTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatNTest.java
index 9a67544e7..fcb7f4b03 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatNTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatNTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests format(n) and format(N)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatPTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatPTest.java
index 143f623b7..7bb0b344d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatPTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatPTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
public class FormatPTest extends TestCase {
public void testPad() {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatProcessingTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatProcessingTest.java
index 69baf16ca..fb91d971b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatProcessingTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatProcessingTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests processing rules not tested elsewhere, and combinations of processing rules.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatQTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatQTest.java
index dc771aae2..4ff882761 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatQTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatQTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests format(q)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatRTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatRTest.java
index 38983b5a4..d0b7ce7ce 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatRTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatRTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests format(r)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatSTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatSTest.java
index 5be32493a..c39eab369 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatSTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatSTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests format(s), and format(S)
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatTest.java
index fa5300f06..f2fc68474 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/FormatTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Test of format() performing tests not covered by tests per rule.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/IntersectionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/IntersectionTest.java
index 04f8a987e..b8c25b04e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/IntersectionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/IntersectionTest.java
@@ -11,11 +11,10 @@
package org.eclipse.equinox.p2.tests.omniVersion;
+import junit.framework.TestCase;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.VersionRange;
-import junit.framework.TestCase;
-
/**
* Tests intersection of VersionRanges.
* - non overlapping ranges
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/MultiplicityTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/MultiplicityTest.java
index 34c9079a0..46fda6ea8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/MultiplicityTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/MultiplicityTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests {n.m} in different combinations and the special +?*
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java
index 5f7061aa8..b59c1c074 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/PerformanceTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Simple performance comparison between OSGi version implementation and Omni Version.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawRangeWithOriginalTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawRangeWithOriginalTest.java
index b2315f6d9..6a2cdd57f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawRangeWithOriginalTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawRangeWithOriginalTest.java
@@ -11,11 +11,10 @@
package org.eclipse.equinox.p2.tests.omniVersion;
+import org.eclipse.equinox.internal.p2.metadata.VersionFormat;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.internal.p2.metadata.VersionFormat;
-
/**
* Tests inclusion of original version range string in raw format.
* The tests in this class does not fully test the various "format(rules)" only that the sequence
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java
index e1c80bb03..65d45efb5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/omniVersion/RawVersionTest.java
@@ -11,9 +11,8 @@
package org.eclipse.equinox.p2.tests.omniVersion;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.equinox.internal.p2.metadata.VersionVector;
+import org.eclipse.equinox.p2.metadata.Version;
/**
* Tests the OmniVersion raw version format.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/ProvisioningPerformanceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/ProvisioningPerformanceTest.java
index cec1ec4e8..a266ae79a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/ProvisioningPerformanceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/perf/ProvisioningPerformanceTest.java
@@ -10,10 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.perf;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java
index 40b53d3e0..092cc6660 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java
@@ -1,6 +1,7 @@
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java
index bfb78b208..81e6ec145 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest2.java
index bad516acc..5967c0fc2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ActualChangeRequestTest2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AddIUProperty.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AddIUProperty.java
index 09af6cb7d..9453e95be 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AddIUProperty.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AddIUProperty.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.SimplePlanner;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AdditionalConstraints.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AdditionalConstraints.java
index 848b6bc8d..b3f20ec08 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AdditionalConstraints.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AdditionalConstraints.java
@@ -10,16 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Arrays;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class AdditionalConstraints extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java
index bc8a9681c..11492913a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstance.java
@@ -8,13 +8,14 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.lang.reflect.Field;
import java.net.URI;
import java.util.Properties;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java
index 0b100dc04..fe52feef3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInExternalInstanceForCohostedMode.java
@@ -8,13 +8,14 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.lang.reflect.Field;
import java.net.URI;
import java.util.Properties;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInRunningInstance.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInRunningInstance.java
index 61af3ee7a..62f695cc6 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInRunningInstance.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AgentPlanTestInRunningInstance.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.net.URI;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOptional.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOptional.java
index 61ab19151..1673e00bf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOptional.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOptional.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class AllOptional extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java
index ffd5aa7e3..3fc0f21e7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.ArrayList;
import java.util.Iterator;
import org.eclipse.core.runtime.IStatus;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AnotherSingleton.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AnotherSingleton.java
index cb6ecc3cb..45ce1bd98 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AnotherSingleton.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AnotherSingleton.java
@@ -10,16 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class AnotherSingleton extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug249605.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug249605.java
index 5738f1770..ba9b74af7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug249605.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug249605.java
@@ -10,16 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.HashMap;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252638.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252638.java
index ec00b0a0a..e9ca817fb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252638.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252638.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java
index 57dc088db..5a048daac 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug252682.java
@@ -10,11 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import java.util.ArrayList;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet1.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet1.java
index 686ab42a7..4b41e815c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet1.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet1.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet2.java
index 7ca98b39a..3fc1debd3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug254481dataSet2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug255984.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug255984.java
index ab3247e31..447dcaf96 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug255984.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug255984.java
@@ -10,17 +10,16 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug262580.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug262580.java
index 0373f3000..15a62f05d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug262580.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug262580.java
@@ -10,9 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270656.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270656.java
index b6db8c800..e35ef9fd6 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270656.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270656.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java
index e027616b6..c1a96c694 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271067.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271067.java
index 5fdbf32f1..2eb536dda 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271067.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271067.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.lang.reflect.Field;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -20,6 +18,7 @@ import org.eclipse.equinox.internal.provisional.p2.director.PlannerHelper;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271954.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271954.java
index bc4b06f8d..da918d722 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271954.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug271954.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.lang.reflect.Field;
import java.net.URI;
@@ -20,6 +18,7 @@ import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug272251.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug272251.java
index 98595cf73..e757ea649 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug272251.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug272251.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug278668.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug278668.java
index aa12a06d6..0599de39f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug278668.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug278668.java
@@ -1,17 +1,15 @@
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.ArrayList;
import java.util.Properties;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104.java
index c4f8093e5..c9aef2329 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104bis.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104bis.java
index b3d5f4722..15760b715 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104bis.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug300104bis.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import java.util.Iterator;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -80,7 +82,7 @@ public class Bug300104bis extends AbstractProvisioningTest {
private ProfileChangeRequest createRequest(IQueryResult<IInstallableUnit> ius) {
ProfileChangeRequest pcr = new ProfileChangeRequest(profileRegistry.getProfile(profileLoadedId));
- pcr.addInstallableUnits(ius);
+ pcr.addInstallableUnits(ius.toArray(IInstallableUnit.class));
Iterator it = ius.iterator();
while (it.hasNext()) {
IInstallableUnit iu = (IInstallableUnit) it.next();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DependencyOnSelf.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DependencyOnSelf.java
index 7edb4168f..c0699854d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DependencyOnSelf.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DependencyOnSelf.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class DependencyOnSelf extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java
index 2e040d80e..08cf5b23b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DropinsScenario.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DropinsScenario.java
index 59cfa193d..4d0df1d4b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DropinsScenario.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DropinsScenario.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class DropinsScenario extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java
index 778a4e885..c43f20f17 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java
index 597d64a1b..3362810ef 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java
index 0f00a3c3a..a42874e93 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationLargeConflict.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationLargeConflict.java
index 87e37f69b..f72e88d34 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationLargeConflict.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationLargeConflict.java
@@ -10,11 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java
index 228a26928..5cfa979d1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/FindingPatchesThroughUpdates.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/FindingPatchesThroughUpdates.java
index c7f0db941..851330f06 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/FindingPatchesThroughUpdates.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/FindingPatchesThroughUpdates.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Properties;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/GreedyRequirement.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/GreedyRequirement.java
index 8ef1e4dd7..3b34d5c2c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/GreedyRequirement.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/GreedyRequirement.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class GreedyRequirement extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java
index 091cc8fc2..c2c0af73b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java
@@ -8,16 +8,14 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java
index 814ae8c98..e5987a30d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java
@@ -8,15 +8,13 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter.java
index 83e7701a4..34ccf638d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter.java
@@ -10,15 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class IUWithFilter extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter2.java
index 566a982ba..ea9ce854d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUWithFilter2.java
@@ -10,16 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class IUWithFilter2 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest.java
index f4fd84b9c..732a87d4a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest.java
@@ -8,12 +8,13 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest2.java
index 13ac96466..08ec71cac 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/InclusionRuleTest2.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall.java
index 72c232e0b..70127e738 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MinimalInstall.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MinimalInstall extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java
index 38f7130d8..6a6fc5d71 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency2.java
index 143987e9e..de209fec3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency2.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MissingDependency2 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency3.java
index 6e633fb7c..93d7ff799 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency3.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MissingDependency3 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java
index a46b2dfd6..6aa3e382e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java
index 6413be606..0d769caff 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptional.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptional.java
index db97fcb56..605fbefd8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptional.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptional.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MissingOptional extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalNonGreedyRequirement.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalNonGreedyRequirement.java
index 2e8e4b529..1a87be48c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalNonGreedyRequirement.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalNonGreedyRequirement.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MissingOptionalNonGreedyRequirement extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies.java
index 55645f68f..76863499f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MissingOptionalWithDependencies extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies2.java
index 5f06ca9cd..2e51c8d37 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies2.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MissingOptionalWithDependencies2 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies3.java
index 2f6cdbb92..dd3ff9407 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingOptionalWithDependencies3.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MissingOptionalWithDependencies3 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleProvider.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleProvider.java
index 84665e854..3e778eece 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleProvider.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleProvider.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class MultipleProvider extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java
index ccb4f7a98..788aa6642 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java
index dcf235537..a1bb25d4d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java
@@ -1,5 +1,7 @@
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.*;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.director.Slicer;
@@ -81,14 +83,17 @@ public class NegationTesting extends AbstractProvisioningTest {
IProfile profile = createProfile("TestProfile." + getName());
IPlanner planner = createPlanner();
ProfileChangeRequest changeRequest = new ProfileChangeRequest(profile);
- changeRequest.addInstallableUnits(new IInstallableUnit[] {iu1});
+ changeRequest.add(iu1);
ProvisioningPlan plan = (ProvisioningPlan) planner.getProvisioningPlan(changeRequest, null, null);
assertEquals(0, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(new InstallableUnitQuery("ProviderOf1_1_1"), null)));
assertEquals(2, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(InstallableUnitQuery.ANY, null)));
//Verify that the installing iu1 and iu3 will result in a conflict since iu3 is excluded by the requirement of iu1
ProfileChangeRequest changeRequest2 = new ProfileChangeRequest(profile);
- changeRequest2.addInstallableUnits(new IInstallableUnit[] {iu1, iu3});
+ Collection<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>();
+ toAdd.add(iu1);
+ toAdd.add(iu3);
+ changeRequest2.addAll(toAdd);
IProvisioningPlan plan2 = planner.getProvisioningPlan(changeRequest2, null, null);
assertNotOK("The resolution should be failing because of the negation requirement.", plan2.getStatus());
}
@@ -169,7 +174,7 @@ public class NegationTesting extends AbstractProvisioningTest {
IProfile profile = createProfile("TestProfile." + getName());
IPlanner planner = createPlanner();
ProfileChangeRequest changeRequest = new ProfileChangeRequest(profile);
- changeRequest.addInstallableUnits(new IInstallableUnit[] {iu1});
+ changeRequest.add(iu1);
ProvisioningPlan plan = (ProvisioningPlan) planner.getProvisioningPlan(changeRequest, null, null);
assertEquals(0, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(new InstallableUnitQuery("ProviderOf1_1_1"), null)));
assertEquals(2, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(InstallableUnitQuery.ANY, null)));
@@ -222,14 +227,17 @@ public class NegationTesting extends AbstractProvisioningTest {
IProfile profile = createProfile("TestProfile." + getName());
IPlanner planner = createPlanner();
ProfileChangeRequest changeRequest = new ProfileChangeRequest(profile);
- changeRequest.addInstallableUnits(new IInstallableUnit[] {iu1});
+ changeRequest.add(iu1);
ProvisioningPlan plan = (ProvisioningPlan) planner.getProvisioningPlan(changeRequest, null, null);
assertEquals(0, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(new InstallableUnitQuery("ProviderOf1_1_1"), null)));
assertEquals(2, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(InstallableUnitQuery.ANY, null)));
//Verify that the installing iu1 and iu3 will result in a conflict since iu3 is excluded by the requirement of iu1
ProfileChangeRequest changeRequest2 = new ProfileChangeRequest(profile);
- changeRequest2.addInstallableUnits(new IInstallableUnit[] {iu1, iu3});
+ Collection<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>();
+ toAdd.add(iu1);
+ toAdd.add(iu3);
+ changeRequest2.addAll(toAdd);
IProvisioningPlan plan2 = planner.getProvisioningPlan(changeRequest2, null, null);
assertNotOK("The resolution should be failing because of the negation requirement.", plan2.getStatus());
}
@@ -293,14 +301,17 @@ public class NegationTesting extends AbstractProvisioningTest {
IProfile profile = createProfile("TestProfile." + getName());
IPlanner planner = createPlanner();
ProfileChangeRequest changeRequest = new ProfileChangeRequest(profile);
- changeRequest.addInstallableUnits(new IInstallableUnit[] {iu1});
+ changeRequest.add(iu1);
ProvisioningPlan plan = (ProvisioningPlan) planner.getProvisioningPlan(changeRequest, null, null);
assertEquals(0, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(new InstallableUnitQuery("ProviderOf1_1_1"), null)));
assertEquals(2, queryResultSize(((PlannerStatus) plan.getStatus()).getPlannedState().query(InstallableUnitQuery.ANY, null)));
//Verify that the installing iu1 and iu4 will result in a conflict since iu3 is excluded by the requirement of iu1
ProfileChangeRequest changeRequest2 = new ProfileChangeRequest(profile);
- changeRequest2.addInstallableUnits(new IInstallableUnit[] {iu1, iu4});
+ Collection<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>();
+ toAdd.add(iu1);
+ toAdd.add(iu4);
+ changeRequest2.addAll(toAdd);
IProvisioningPlan plan2 = planner.getProvisioningPlan(changeRequest2, null, null);
assertNotOK("The resolution should be failing because of the negation requirement.", plan2.getStatus());
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoRequirements.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoRequirements.java
index 7b6dc4d68..8e4b34cd1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoRequirements.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NoRequirements.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class NoRequirements extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState.java
index ad3971869..e2b30a8f0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState.java
@@ -10,12 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import java.net.URI;
import java.util.*;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java
index 500229461..58edfacd2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NonMinimalState2.java
@@ -10,17 +10,15 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PP2ShouldFailToInstall.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PP2ShouldFailToInstall.java
index 36650a296..086a3127e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PP2ShouldFailToInstall.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PP2ShouldFailToInstall.java
@@ -10,13 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchFailingToInstall.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchFailingToInstall.java
index c2e29f222..465583654 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchFailingToInstall.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchFailingToInstall.java
@@ -10,13 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1.java
index 2c323f982..6dbbf4e43 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest10.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest10.java
index 2f72df7f9..4ed2d65ae 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest10.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest10.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest11.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest11.java
index 694599a00..c336b57d7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest11.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest11.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java
index 9da689de8..28717fbb4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest13.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest13.java
index 4e1f7bd92..aecd75ada 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest13.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest13.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1b.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1b.java
index 464dbcf01..4327c53f5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1b.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1b.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1c.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1c.java
index 4b16ecc15..e0a5daf91 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1c.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest1c.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java
index 0096833e3..76d320dc7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest3.java
index a7d0dc30e..ce4d56648 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest3.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest4.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest4.java
index ff1253f15..1c53e88d8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest4.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest4.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest5.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest5.java
index 008a7b57f..19b4f8bb2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest5.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest5.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java
index 0b08bb6ac..9fef65397 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7.java
index 0043baed3..eaa016629 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7b.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7b.java
index 0e143f71f..c165363c6 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7b.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest7b.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest8.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest8.java
index c24ded126..e8a18998a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest8.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest8.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java
index debd36e40..e8c69e159 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch.java
index 0776f5d5b..8a66e3415 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch.java
@@ -10,12 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch2.java
index 81b2b0a43..09d34bf03 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch2.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch3.java
index d8e753492..e18d7128f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestMultiplePatch3.java
@@ -10,12 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional.java
index dadbee8f1..861b444e9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional.java
@@ -10,12 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional2.java
index cde7abc17..e5faac04c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional2.java
@@ -10,12 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional3.java
index e02c1f0f1..ddfefbc59 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestOptional3.java
@@ -10,12 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUninstall.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUninstall.java
index 2c56c9998..b5dd777e8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUninstall.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUninstall.java
@@ -10,13 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java
index db1542ee5..031ec3f8e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate2.java
index 33435997a..1498b0ec5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate2.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate3.java
index 3a801f153..3942f2919 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate3.java
@@ -10,14 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import java.net.URI;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate4.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate4.java
index 8ccff47f3..949339b66 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate4.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate4.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate5.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate5.java
index 532aff861..8e11846c1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate5.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate5.java
@@ -10,13 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest1.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest1.java
index 65ee61a6e..219bcf557 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest1.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest1.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import java.util.ArrayList;
import org.eclipse.core.runtime.NullProgressMonitor;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest2.java
index 5016a31b0..b78202d0f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SDKPatchingTest2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import java.util.ArrayList;
import org.eclipse.core.runtime.NullProgressMonitor;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SWTFragment.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SWTFragment.java
index 97f93aa7d..d3b9c032d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SWTFragment.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SWTFragment.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies.java
index 1c829d081..5af37e424 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SeveralOptionalDependencies extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies2.java
index 220e60267..e79d2a29e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies2.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SeveralOptionalDependencies2 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies3.java
index 279b553da..642ddb544 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies3.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SeveralOptionalDependencies3 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies4.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies4.java
index fd4b24977..aa1145f00 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies4.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies4.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SeveralOptionalDependencies4 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies5.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies5.java
index b7f38dff2..12218dbff 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies5.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SeveralOptionalDependencies5.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SeveralOptionalDependencies5 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest.java
index 40a025920..26608fa48 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SimpleOptionalTest extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest2.java
index 17af35a66..1987c1ca7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest2.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SimpleOptionalTest2 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest3.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest3.java
index 2aff62927..ea92c9bea 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest3.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest3.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SimpleOptionalTest3 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest4.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest4.java
index 6d577d7a0..d2dba8f8e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest4.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest4.java
@@ -8,17 +8,15 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SimpleOptionalTest4 extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest5.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest5.java
index 754b104b9..1dd586d35 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest5.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleOptionalTest5.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java
index 5c313d621..309c9cde7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.director.Explanation;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java
index f71eae8cc..600e6b1f2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimulatedSharedInstallTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.net.URI;
import java.util.*;
import org.eclipse.core.runtime.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled.java
index f9b5a46f4..23361ee1a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled2.java
index 7f89fa6f2..5e048cf72 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SingletonOptionallyInstalled2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java
index 95546c1f5..2b19a677d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TopLevelFilterTest.java
@@ -10,13 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class TopLevelFilterTest extends AbstractProvisioningTest {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TwoVersionsOfWSDL.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TwoVersionsOfWSDL.java
index aea44bc04..40d52fe24 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TwoVersionsOfWSDL.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TwoVersionsOfWSDL.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UninstallEverything.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UninstallEverything.java
index 56919d657..ed911c968 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UninstallEverything.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UninstallEverything.java
@@ -8,13 +8,12 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateQueryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateQueryTest.java
index 6d8b155c1..d05a7cb65 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateQueryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/UpdateQueryTest.java
@@ -1,10 +1,7 @@
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AbstractPublisherActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AbstractPublisherActionTest.java
index 0262ec528..9d299836d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AbstractPublisherActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AbstractPublisherActionTest.java
@@ -10,15 +10,12 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.publisher.*;
import org.eclipse.equinox.p2.publisher.actions.ICapabilityAdvice;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
index 538fcee07..17d8dab2d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
@@ -10,13 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.util.*;
import junit.framework.TestCase;
import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.FragmentQuery;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceMatcher.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceMatcher.java
index b99d3c3d8..010469ce2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceMatcher.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceMatcher.java
@@ -10,10 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.easymock.EasyMock;
import org.easymock.IArgumentMatcher;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/DefaultCUsActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/DefaultCUsActionTest.java
index 22806f1b6..68e2b5962 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/DefaultCUsActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/DefaultCUsActionTest.java
@@ -10,13 +10,12 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.util.Collection;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.metadata.InstallableUnitFragment;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.publisher.eclipse.DefaultCUsAction;
@SuppressWarnings({"unchecked"})
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
index 1ba56c201..c237e2fc4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
@@ -12,14 +12,10 @@ package org.eclipse.equinox.p2.tests.publisher.actions;
import static org.easymock.EasyMock.*;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
import java.util.*;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.metadata.InstallableUnitFragment;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.publisher.IPublisherResult;
import org.eclipse.equinox.p2.publisher.PublisherResult;
import org.eclipse.equinox.p2.publisher.actions.IVersionAdvice;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java
index e4b41a024..ebc4419d3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java
@@ -10,9 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java
index fbe719c61..66495f8bf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java
@@ -12,13 +12,12 @@ package org.eclipse.equinox.p2.tests.publisher.actions;
import static org.easymock.EasyMock.*;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.util.Collections;
import org.easymock.Capture;
import org.easymock.EasyMock;
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
import org.eclipse.equinox.p2.publisher.IPublisherInfo;
import org.eclipse.equinox.p2.publisher.actions.RootIUAdvice;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java
index a30a3d39f..169651e30 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java
@@ -10,8 +10,6 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.io.File;
import java.net.URI;
import java.util.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java
index 683589f92..e121482eb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java
@@ -9,14 +9,13 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.util.List;
import java.util.Map;
import junit.framework.TestCase;
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.TestData;
/**
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/VersionAdviceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/VersionAdviceTest.java
index 579fb145e..1a2922812 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/VersionAdviceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/VersionAdviceTest.java
@@ -9,9 +9,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.publisher.actions;
-import org.eclipse.equinox.p2.metadata.Version;
-
import junit.framework.TestCase;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
import org.eclipse.equinox.p2.tests.TestData;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java
index 70ffe003e..f4ce35ca4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddRepositoryActionTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
-import org.eclipse.equinox.p2.metadata.Version;
-
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
@@ -26,8 +24,7 @@ import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.ITouchpointData;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
index a2ea89d1d..bbd39435d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.io.File;
import java.net.*;
import java.util.*;
@@ -17,7 +19,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/TestUpdateListener.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/TestUpdateListener.java
index 605b77a35..0dc6f1e73 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/TestUpdateListener.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/TestUpdateListener.java
@@ -34,7 +34,7 @@ public class TestUpdateListener implements IUpdateListener {
if (!(o instanceof UpdateEvent))
return false;
UpdateEvent actual = (UpdateEvent) o;
- return Arrays.equals(expectedEvent.getIUs(), actual.getIUs()) && expectedEvent.getProfileId().equals(actual.getProfileId());
+ return Arrays.equals(expectedEvent.getIUs().toArray(), actual.getIUs().toArray()) && expectedEvent.getProfileId().equals(actual.getProfileId());
}
public void updatesAvailable(UpdateEvent event) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/UpdateCheckerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/UpdateCheckerTest.java
index 88e7ad191..e3eae5632 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/UpdateCheckerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatechecker/UpdateCheckerTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.updatechecker;
+import java.util.ArrayList;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
@@ -58,7 +59,9 @@ public class UpdateCheckerTest extends AbstractProvisioningTest {
public void testAddListener() {
IUpdateChecker checker = getChecker();
- TestUpdateListener listener = new TestUpdateListener(new UpdateEvent(profile.getProfileId(), new IInstallableUnit[] {toInstallIU}));
+ ArrayList<IInstallableUnit> toUpdate = new ArrayList<IInstallableUnit>();
+ toUpdate.add(toInstallIU);
+ TestUpdateListener listener = new TestUpdateListener(new UpdateEvent(profile.getProfileId(), toUpdate));
checker.addUpdateCheck(profile.getProfileId(), InstallableUnitQuery.ANY, IUpdateChecker.ONE_TIME_CHECK, 0, listener);
listener.waitForEvent();
listener.verify(1);
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
index 9238a2a41..8f462754f 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
@@ -21,6 +21,7 @@ Import-Package: javax.xml.parsers,
org.eclipse.equinox.p2.engine.spi,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.publisher;resolution:=optional,
org.eclipse.equinox.p2.publisher.eclipse;resolution:=optional,
org.eclipse.equinox.p2.query,
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
index e18c71123..52519d457 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
* 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
@@ -7,12 +7,14 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.net.URI;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.ProvisioningContext;
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
index ce7393340..64c5e31b7 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
index a4650cde7..93a0bffd8 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Sep 18 21:25:49 EDT 2007
+#Mon Feb 08 20:20:50 EST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -71,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -143,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
index d577f0222..743825dcf 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
@@ -36,5 +36,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.equinox.p2.updatechecker,
org.eclipse.equinox.p2.ui
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
index 34fb38f6f..0ab4608d8 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
@@ -7,13 +7,13 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.EventObject;
+import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.*;
import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
@@ -37,7 +37,7 @@ public class AutomaticUpdater implements IUpdateListener {
StatusLineCLabelContribution updateAffordance;
IStatusLineManager statusLineManager;
- IInstallableUnit[] iusWithUpdates;
+ Collection<IInstallableUnit> iusWithUpdates;
String profileId;
ProvisioningListener profileListener;
AutomaticUpdatesPopup popup;
@@ -160,18 +160,18 @@ public class AutomaticUpdater implements IUpdateListener {
*/
void validateIusToUpdate() {
- ArrayList list = new ArrayList();
+ ArrayList<IInstallableUnit> list = new ArrayList<IInstallableUnit>(iusWithUpdates.size());
IProfile profile = getSession().getProfileRegistry().getProfile(profileId);
- for (int i = 0; i < iusWithUpdates.length; i++) {
+ for (IInstallableUnit iuWithUpdate : iusWithUpdates) {
try {
- if (validToUpdate(profile, iusWithUpdates[i]))
- list.add(iusWithUpdates[i]);
+ if (validToUpdate(profile, iuWithUpdate))
+ list.add(iuWithUpdate);
} catch (OperationCanceledException e) {
// Nothing to report
}
}
- iusWithUpdates = (IInstallableUnit[]) list.toArray(new IInstallableUnit[list.size()]);
+ iusWithUpdates = list;
}
// A proposed update is valid if it is still visible to the user as an
diff --git a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
index 7be6c0e69..236db7a77 100644
--- a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
@@ -27,6 +27,7 @@ Import-Package: com.ibm.icu.text,
org.eclipse.equinox.p2.metadata.expression,
org.eclipse.equinox.p2.metadata.query,
org.eclipse.equinox.p2.operations,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
org.eclipse.equinox.p2.repository.artifact,
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
index c74f19f66..ff289cfb6 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.actions;
+import java.util.Collection;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.model.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -55,11 +57,11 @@ public class InstallAction extends ProfileModificationAction {
return super.isSelectable(element) && !(element.getParent(element) instanceof AvailableIUElement);
}
- protected int performAction(ProfileChangeOperation operation, IInstallableUnit[] ius) {
+ protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
return getProvisioningUI().openInstallWizard(getShell(), ius, (InstallOperation) operation, null);
}
- protected ProfileChangeOperation getProfileChangeOperation(IInstallableUnit[] ius) {
+ protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
InstallOperation op = new InstallOperation(getSession(), ius);
op.setProfileId(profileId);
// op.setRootMarkerKey(getPolicy().getQueryContext().getVisibleInstalledIUProperty());
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
index 70b4ba85d..e9b309d78 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -7,14 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.actions;
-import org.eclipse.equinox.p2.ui.LicenseManager;
-
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
@@ -26,6 +24,7 @@ import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.ui.LicenseManager;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.window.Window;
@@ -47,9 +46,9 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
}
public void run() {
- IInstallableUnit[] ius = getSelectedIUs();
+ Collection<IInstallableUnit> ius = getSelectedIUs();
// No ius or no profile?
- if (profileId == null || ius.length == 0) {
+ if (profileId == null || ius.size() == 0) {
ProvUI.reportStatus(getNoProfileOrSelectionStatus(profileId, ius), StatusManager.BLOCK);
runCanceled();
return;
@@ -62,13 +61,13 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
return ui.getSession().getProfileRegistry().getProfile(id);
}
- protected IStatus getNoProfileOrSelectionStatus(String id, IInstallableUnit[] ius) {
- return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.ProfileModificationAction_InvalidSelections, id, new Integer(ius.length)));
+ protected IStatus getNoProfileOrSelectionStatus(String id, Collection<IInstallableUnit> ius) {
+ return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.ProfileModificationAction_InvalidSelections, id, new Integer(ius.size())));
}
- protected abstract ProfileChangeOperation getProfileChangeOperation(IInstallableUnit[] ius);
+ protected abstract ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius);
- protected void run(final IInstallableUnit[] ius, final String id) {
+ protected void run(final Collection<IInstallableUnit> ius, final String id) {
final ProfileChangeOperation operation = getProfileChangeOperation(ius);
ProvisioningJob job = operation.getResolveJob(null);
if (job == null) {
@@ -124,7 +123,7 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
return false;
}
- protected abstract int performAction(ProfileChangeOperation operation, IInstallableUnit[] ius);
+ protected abstract int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius);
protected IInstallableUnit getIU(Object element) {
return ProvUI.getAdapter(element, IInstallableUnit.class);
@@ -141,7 +140,7 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
* @return an array of selected IInstallableUnit that meet the
* enablement criteria for the action.
*/
- protected IInstallableUnit[] getSelectedIUs() {
+ protected List<IInstallableUnit> getSelectedIUs() {
List<?> elements = getStructuredSelection().toList();
List<IInstallableUnit> iusList = new ArrayList<IInstallableUnit>(elements.size());
@@ -156,7 +155,7 @@ public abstract class ProfileModificationAction extends ProvisioningAction {
iusList.add(iu);
}
}
- return iusList.toArray(new IInstallableUnit[iusList.size()]);
+ return iusList;
}
protected boolean isSelectable(IIUElement element) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
index 6ee186140..bedfc531a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.actions;
+import java.util.Collection;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.p2.engine.IProfile;
@@ -41,14 +43,14 @@ public class UninstallAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
- protected ProfileChangeOperation getProfileChangeOperation(IInstallableUnit[] ius) {
+ protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
return ui.getUninstallOperation(ius, null);
}
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
- protected int performAction(ProfileChangeOperation operation, IInstallableUnit[] ius) {
+ protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
return ui.openUninstallWizard(getShell(), ius, (UninstallOperation) operation, null);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
index 4b848e5f8..2a72e53f7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -7,11 +7,13 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.actions;
import java.util.ArrayList;
+import java.util.Collection;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
@@ -57,14 +59,14 @@ public class UpdateAction extends ExistingIUInProfileAction {
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
- protected ProfileChangeOperation getProfileChangeOperation(IInstallableUnit[] ius) {
+ protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
return ui.getUpdateOperation(ius, null);
}
/* (non-Javadoc)
* @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
*/
- protected int performAction(ProfileChangeOperation operation, IInstallableUnit[] ius) {
+ protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
return ui.openUpdateWizard(getShell(), skipSelectionPage, (UpdateOperation) operation, null);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
index aef12b0c0..a242299fe 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
* 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
@@ -272,7 +273,7 @@ public class AvailableIUGroup extends StructuredIUGroup {
* @return the array of selected IU's
*/
// overridden for visibility in the public package
- public IInstallableUnit[] getSelectedIUs() {
+ public java.util.List<IInstallableUnit> getSelectedIUs() {
return super.getSelectedIUs();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
index e50439e8f..e472cac8a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* EclipseSource - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
@@ -442,20 +443,20 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
}
// Now look for IU's
- IInstallableUnit[] selected = getSelectedIUs();
- if (selected.length == 1) {
+ java.util.List<IInstallableUnit> selected = getSelectedIUs();
+ if (selected.size() == 1) {
StringBuffer result = new StringBuffer();
- String description = selected[0].getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
+ String description = selected.get(0).getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
if (description != null) {
result.append(description);
} else {
- String name = selected[0].getProperty(IInstallableUnit.PROP_NAME, null);
+ String name = selected.get(0).getProperty(IInstallableUnit.PROP_NAME, null);
if (name != null)
result.append(name);
else
- result.append(selected[0].getId());
+ result.append(selected.get(0).getId());
result.append(" "); //$NON-NLS-1$
- result.append(selected[0].getVersion().toString());
+ result.append(selected.get(0).getVersion().toString());
}
iuDetailsGroup.setDetailText(result.toString());
@@ -464,7 +465,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
iuDetailsGroup.setDetailText(""); //$NON-NLS-1$
}
- public IInstallableUnit[] getSelectedIUs() {
+ public java.util.List<IInstallableUnit> getSelectedIUs() {
return availableIUGroup.getSelectedIUs();
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
index a5e83d9e6..d04bb55f7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
@@ -7,10 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
import java.util.ArrayList;
+import java.util.Collection;
import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.model.*;
@@ -32,8 +34,8 @@ public class InstallWizard extends WizardWithLicenses {
SelectableIUsPage errorReportingPage;
- public InstallWizard(ProvisioningUI ui, InstallOperation operation, IInstallableUnit[] initialSelections, LoadMetadataRepositoryJob preloadJob) {
- super(ui, operation, initialSelections, preloadJob);
+ public InstallWizard(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob preloadJob) {
+ super(ui, operation, initialSelections.toArray(), preloadJob);
setWindowTitle(ProvUIMessages.InstallIUOperationLabel);
setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
index 45d4f22dc..e1789864a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
@@ -7,12 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement;
-
import java.util.ArrayList;
+import java.util.Collection;
import org.eclipse.equinox.internal.p2.ui.*;
import org.eclipse.equinox.internal.p2.ui.model.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -31,8 +31,8 @@ public class PreselectedIUInstallWizard extends WizardWithLicenses {
QueryableMetadataRepositoryManager manager;
- public PreselectedIUInstallWizard(ProvisioningUI ui, InstallOperation operation, IInstallableUnit[] initialSelections, LoadMetadataRepositoryJob job) {
- super(ui, operation, initialSelections, job);
+ public PreselectedIUInstallWizard(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob job) {
+ super(ui, operation, initialSelections.toArray(), job);
setWindowTitle(ProvUIMessages.InstallIUOperationLabel);
setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
index 28233c9ea..a661b27c3 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
@@ -149,10 +150,10 @@ public abstract class ProvisioningOperationWizard extends Wizard {
private boolean pageSelectionsHaveChanged(ISelectableIUsPage page) {
HashSet<IInstallableUnit> selectedIUs = new HashSet<IInstallableUnit>();
Object[] currentSelections = page.getCheckedIUElements();
- selectedIUs.addAll(Arrays.asList(ElementUtils.elementsToIUs(currentSelections)));
+ selectedIUs.addAll(ElementUtils.elementsToIUs(currentSelections));
HashSet<IInstallableUnit> lastIUSelections = new HashSet<IInstallableUnit>();
if (planSelections != null)
- lastIUSelections.addAll(Arrays.asList(ElementUtils.elementsToIUs(planSelections)));
+ lastIUSelections.addAll(ElementUtils.elementsToIUs(planSelections));
return !(selectedIUs.equals(lastIUSelections));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
index eeb4aebf9..04b9f335a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
@@ -8,9 +8,11 @@
* Contributors:
* IBM Corporation - initial API and implementation
* EclipseSource - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import java.util.Collection;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.ui.model.*;
import org.eclipse.equinox.internal.p2.ui.viewers.*;
@@ -156,13 +158,13 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
}
protected IInstallableUnit getSelectedIU() {
- IInstallableUnit[] units = ElementUtils.elementsToIUs(getSelectedElements());
- if (units.length == 0)
+ java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
+ if (units.size() == 0)
return null;
- return units[0];
+ return units.get(0);
}
- protected IInstallableUnit[] getIUs() {
+ protected Collection<IInstallableUnit> getIUs() {
return ElementUtils.elementsToIUs(input.getChildren(input));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
index 0af6d74b3..997f448c0 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* EclipseSource - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
@@ -248,10 +249,10 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
}
protected IInstallableUnit getSelectedIU() {
- IInstallableUnit[] units = ElementUtils.elementsToIUs(getSelectedElements());
- if (units.length == 0)
+ java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
+ if (units.size() == 0)
return null;
- return units[0];
+ return units.get(0);
}
protected IUDetailsGroup getDetailsGroup() {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java
index 44ffabc05..c298a728b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java
@@ -7,9 +7,11 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
+import java.util.List;
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.internal.p2.ui.QueryProvider;
import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
@@ -105,7 +107,7 @@ public abstract class StructuredIUGroup {
return columnConfig;
}
- public IInstallableUnit[] getSelectedIUs() {
+ public List<IInstallableUnit> getSelectedIUs() {
return ElementUtils.elementsToIUs(getSelectedIUElements());
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
index e5cb26203..f5afea512 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
@@ -7,12 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-
import java.util.ArrayList;
+import java.util.Collection;
import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.model.*;
@@ -28,8 +28,8 @@ import org.eclipse.jface.wizard.IWizardPage;
*/
public class UninstallWizard extends ProvisioningOperationWizard {
- public UninstallWizard(ProvisioningUI ui, UninstallOperation operation, IInstallableUnit[] initialSelections, LoadMetadataRepositoryJob job) {
- super(ui, operation, initialSelections, job);
+ public UninstallWizard(ProvisioningUI ui, UninstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob job) {
+ super(ui, operation, initialSelections.toArray(), job);
setWindowTitle(ProvUIMessages.UninstallIUOperationLabel);
setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UNINSTALL));
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
index c983f8320..ee3c10e24 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Genuitec, LLC - added license support
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
@@ -31,14 +32,14 @@ public class UpdateWizard extends WizardWithLicenses {
boolean skipSelectionsPage = false;
IUElementListRoot firstPageRoot;
- public static IInstallableUnit[] getIUsToReplace(Object[] elements) {
+ public static Collection<IInstallableUnit> getIUsToReplace(Object[] elements) {
Set<IInstallableUnit> iusToReplace = new HashSet<IInstallableUnit>();
for (int i = 0; i < elements.length; i++) {
if (elements[i] instanceof AvailableUpdateElement) {
iusToReplace.add(((AvailableUpdateElement) elements[i]).getIUToBeUpdated());
}
}
- return iusToReplace.toArray(new IInstallableUnit[iusToReplace.size()]);
+ return iusToReplace;
}
public static IInstallableUnit[] getReplacementIUs(Object[] elements) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
index a8b7e0646..8f5765b51 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* David Dubrow <david.dubrow@nokia.com> - Bug 276356 [ui] check the wizard and page completion logic for AcceptLicensesWizardPage
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.dialogs;
@@ -42,7 +43,7 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
protected AcceptLicensesWizardPage createLicensesPage() {
IInstallableUnit[] ius = new IInstallableUnit[0];
if (planSelections != null)
- ius = ElementUtils.elementsToIUs(planSelections);
+ ius = ElementUtils.elementsToIUs(planSelections).toArray(new IInstallableUnit[0]);
return new AcceptLicensesWizardPage(ui.getLicenseManager(), ius, operation);
}
@@ -64,7 +65,7 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
protected void planChanged() {
super.planChanged();
- licensePage.update(ElementUtils.elementsToIUs(planSelections), operation);
+ licensePage.update(ElementUtils.elementsToIUs(planSelections).toArray(new IInstallableUnit[0]), operation);
}
/*
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
index 36bc42c69..e82c0464c 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.model;
@@ -95,7 +96,7 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) {
ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID);
- request.addInstallableUnits(new IInstallableUnit[] {getIU()});
+ request.add(getIU());
return getProvisioningUI().getSession().getPlanner().getProvisioningPlan(request, getProvisioningContext(), monitor);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
index 8e3449cd8..5bf38afc7 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.model;
@@ -42,8 +43,8 @@ public class AvailableUpdateElement extends AvailableIUElement {
protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) {
ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID);
if (iuToBeUpdated.getId().equals(getIU().getId()))
- request.removeInstallableUnit(iuToBeUpdated);
- request.addInstallableUnits(getIU());
+ request.remove(iuToBeUpdated);
+ request.add(getIU());
return ProvUIActivator.getDefault().getSession().getPlanner().getProvisioningPlan(request, new ProvisioningContext(), monitor);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java
index b75a0d8ee..6edd9bb71 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.model;
@@ -110,14 +111,14 @@ public class ElementUtils {
return ProvUI.getAdapter(element, IInstallableUnit.class);
}
- public static IInstallableUnit[] elementsToIUs(Object[] elements) {
+ public static List<IInstallableUnit> elementsToIUs(Object[] elements) {
ArrayList<IInstallableUnit> theIUs = new ArrayList<IInstallableUnit>(elements.length);
for (int i = 0; i < elements.length; i++) {
IInstallableUnit iu = ProvUI.getAdapter(elements[i], IInstallableUnit.class);
if (iu != null)
theIUs.add(iu);
}
- return theIUs.toArray(new IInstallableUnit[theIUs.size()]);
+ return theIUs;
}
static boolean containsURI(URI[] locations, URI url) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
index fbcad64ce..5bd7abbae 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
@@ -8,13 +8,15 @@
* Contributors:
* IBM Corporation - initial API and implementation
* EclipseSource - ongoing development
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.query;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.util.ArrayList;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.p2.engine.ProvisioningContext;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.query.*;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
index d7c68f9e3..906213ecc 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.p2.ui;
@@ -185,9 +186,9 @@ public class InstalledSoftwarePage extends InstallationPage implements ICopyable
}
void updateDetailsArea() {
- IInstallableUnit[] selected = installedIUGroup.getSelectedIUs();
- if (selected.length == 1) {
- String description = selected[0].getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
+ java.util.List<IInstallableUnit> selected = installedIUGroup.getSelectedIUs();
+ if (selected.size() == 1) {
+ String description = selected.get(0).getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
if (description != null) {
detailsArea.setText(description);
return;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
index eb4276fda..a316d8007 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
@@ -7,11 +7,13 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.p2.ui;
import java.net.URI;
+import java.util.Collection;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
@@ -132,7 +134,7 @@ public class ProvisioningUI {
* @param repositories the repositories to use for the operation
* @return the install operation
*/
- public InstallOperation getInstallOperation(IInstallableUnit[] iusToInstall, URI[] repositories) {
+ public InstallOperation getInstallOperation(Collection<IInstallableUnit> iusToInstall, URI[] repositories) {
InstallOperation op = new InstallOperation(getSession(), iusToInstall);
op.setProfileId(getProfileId());
op.setProvisioningContext(makeProvisioningContext(repositories));
@@ -147,7 +149,7 @@ public class ProvisioningUI {
* @param repositories the repositories to use for the operation
* @return the update operation
*/
- public UpdateOperation getUpdateOperation(IInstallableUnit[] iusToUpdate, URI[] repositories) {
+ public UpdateOperation getUpdateOperation(Collection<IInstallableUnit> iusToUpdate, URI[] repositories) {
UpdateOperation op = new UpdateOperation(getSession(), iusToUpdate);
op.setProfileId(getProfileId());
op.setProvisioningContext(makeProvisioningContext(repositories));
@@ -162,7 +164,7 @@ public class ProvisioningUI {
* @param repositories the repositories to use for the operation
* @return the uninstall operation
*/
- public UninstallOperation getUninstallOperation(IInstallableUnit[] iusToUninstall, URI[] repositories) {
+ public UninstallOperation getUninstallOperation(Collection<IInstallableUnit> iusToUninstall, URI[] repositories) {
UninstallOperation op = new UninstallOperation(getSession(), iusToUninstall);
op.setProfileId(getProfileId());
op.setProvisioningContext(makeProvisioningContext(repositories));
@@ -192,7 +194,7 @@ public class ProvisioningUI {
*
* @return the wizard return code
*/
- public int openInstallWizard(Shell shell, IInstallableUnit[] initialSelections, InstallOperation operation, LoadMetadataRepositoryJob job) {
+ public int openInstallWizard(Shell shell, Collection<IInstallableUnit> initialSelections, InstallOperation operation, LoadMetadataRepositoryJob job) {
if (operation == null) {
InstallWizard wizard = new InstallWizard(this, operation, initialSelections, job);
WizardDialog dialog = new ProvisioningWizardDialog(shell, wizard);
@@ -239,7 +241,7 @@ public class ProvisioningUI {
*
* @return the wizard return code
*/
- public int openUninstallWizard(Shell shell, IInstallableUnit[] initialSelections, UninstallOperation operation, LoadMetadataRepositoryJob job) {
+ public int openUninstallWizard(Shell shell, Collection<IInstallableUnit> initialSelections, UninstallOperation operation, LoadMetadataRepositoryJob job) {
UninstallWizard wizard = new UninstallWizard(this, operation, initialSelections, job);
WizardDialog dialog = new ProvisioningWizardDialog(shell, wizard);
dialog.create();
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
index 63480f100..5a2850d66 100644
--- a/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
@@ -13,6 +13,7 @@ Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
org.eclipse.equinox.p2.engine,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
org.eclipse.equinox.p2.repository.metadata,
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
index 39d854a92..8128659e1 100644
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
+++ b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.updatechecker;
@@ -17,13 +18,13 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.query.IQuery;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
@@ -70,8 +71,8 @@ public class UpdateChecker implements IUpdateChecker {
while (!done) {
trace("Checking for updates for " + profileId + " at " + getTimeStamp()); //$NON-NLS-1$ //$NON-NLS-2$
- IInstallableUnit[] iusWithUpdates = checkForUpdates(profileId, query);
- if (iusWithUpdates.length > 0) {
+ Collection<IInstallableUnit> iusWithUpdates = checkForUpdates(profileId, query);
+ if (iusWithUpdates.size() > 0) {
trace("Notifying listener of available updates"); //$NON-NLS-1$
UpdateEvent event = new UpdateEvent(profileId, iusWithUpdates);
if (!done)
@@ -120,11 +121,11 @@ public class UpdateChecker implements IUpdateChecker {
* Return the array of ius in the profile that have updates
* available.
*/
- IInstallableUnit[] checkForUpdates(String profileId, IQuery<IInstallableUnit> query) {
+ Collection<IInstallableUnit> checkForUpdates(String profileId, IQuery<IInstallableUnit> query) {
IProfile profile = getProfileRegistry().getProfile(profileId);
ArrayList<IInstallableUnit> iusWithUpdates = new ArrayList<IInstallableUnit>();
if (profile == null)
- return new IInstallableUnit[0];
+ return Collections.emptyList();
ProvisioningContext context = new ProvisioningContext(getAvailableRepositories());
if (query == null)
query = InstallableUnitQuery.ANY;
@@ -135,7 +136,7 @@ public class UpdateChecker implements IUpdateChecker {
if (replacements.length > 0)
iusWithUpdates.add(iu);
}
- return iusWithUpdates.toArray(new IInstallableUnit[iusWithUpdates.size()]);
+ return iusWithUpdates;
}
/**
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
index 6a6297852..7c4a38890 100644
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
+++ b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
@@ -7,9 +7,11 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.updatechecker;
+import java.util.Collection;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
/**
@@ -18,14 +20,14 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit;
public class UpdateEvent {
String profileId;
- IInstallableUnit[] iusWithUpdates;
+ Collection<IInstallableUnit> iusWithUpdates;
- public UpdateEvent(String profileId, IInstallableUnit[] iusWithUpdates) {
+ public UpdateEvent(String profileId, Collection<IInstallableUnit> iusWithUpdates) {
this.profileId = profileId;
this.iusWithUpdates = iusWithUpdates;
}
- public IInstallableUnit[] getIUs() {
+ public Collection<IInstallableUnit> getIUs() {
return iusWithUpdates;
}

Back to the top